From 0509465542d63a5bbe7296f283f44dd491e74f78 Mon Sep 17 00:00:00 2001 From: John Newbery Date: Tue, 2 Apr 2019 16:51:32 -0400 Subject: [PATCH] [build] Move rpc rawtransaction util functions to rpc/rawtransaction_util.cpp rpc/rawtransaction.cpp moves to libbitcoin_server since it should not be accessed by non-node libraries. The utility following utility methods move to their own unit rpc/rawtransaction_util since they need to be accessed by non-node libraries: - `ConstructTransaction` - `TxInErrorToJSON` - `SignTransaction` --- src/Makefile.am | 3 +- src/rpc/rawtransaction.cpp | 278 +---------------- src/rpc/rawtransaction_util.cpp | 293 ++++++++++++++++++ ...rawtransaction.h => rawtransaction_util.h} | 8 +- src/wallet/rpcwallet.cpp | 2 +- 5 files changed, 301 insertions(+), 283 deletions(-) create mode 100644 src/rpc/rawtransaction_util.cpp rename src/rpc/{rawtransaction.h => rawtransaction_util.h} (85%) diff --git a/src/Makefile.am b/src/Makefile.am index cbbf35ccb..b0d718f60 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -176,7 +176,7 @@ BITCOIN_CORE_H = \ rpc/mining.h \ rpc/protocol.h \ rpc/server.h \ - rpc/rawtransaction.h \ + rpc/rawtransaction_util.h \ rpc/register.h \ rpc/util.h \ scheduler.h \ @@ -439,6 +439,7 @@ libbitcoin_common_a_SOURCES = \ policy/policy.cpp \ protocol.cpp \ psbt.cpp \ + rpc/rawtransaction_util.cpp \ rpc/util.cpp \ scheduler.cpp \ script/descriptor.cpp \ diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 6ecde84cd..4da952060 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include