From c6c3d42a7d6b525144fc7fc6653cd11139d2b34a Mon Sep 17 00:00:00 2001 From: Glenn Willen Date: Wed, 9 Jan 2019 02:06:29 -0800 Subject: Move PSBT definitions and code to separate files Move non-wallet PSBT code to src/psbt.{h,cpp}, and PSBT wallet code to src/wallet/psbtwallet.{h,cpp}. This commit contains only code movement (and adjustments to includes and Makefile.am.) --- src/Makefile.am | 4 + src/core_read.cpp | 1 + src/psbt.cpp | 227 ++++++++++++++ src/psbt.h | 553 ++++++++++++++++++++++++++++++++++ src/rpc/rawtransaction.cpp | 1 + src/script/sign.cpp | 221 -------------- src/script/sign.h | 540 --------------------------------- src/wallet/psbtwallet.cpp | 60 ++++ src/wallet/psbtwallet.h | 14 + src/wallet/rpcwallet.cpp | 55 +--- src/wallet/rpcwallet.h | 1 - src/wallet/test/psbt_wallet_tests.cpp | 1 + 12 files changed, 862 insertions(+), 816 deletions(-) create mode 100644 src/psbt.cpp create mode 100644 src/psbt.h create mode 100644 src/wallet/psbtwallet.cpp create mode 100644 src/wallet/psbtwallet.h diff --git a/src/Makefile.am b/src/Makefile.am index 9a87af2efc..7490d8b790 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -162,6 +162,7 @@ BITCOIN_CORE_H = \ policy/rbf.h \ pow.h \ protocol.h \ + psbt.h \ random.h \ reverse_iterator.h \ reverselock.h \ @@ -210,6 +211,7 @@ BITCOIN_CORE_H = \ wallet/db.h \ wallet/feebumper.h \ wallet/fees.h \ + wallet/psbtwallet.h \ wallet/rpcwallet.h \ wallet/wallet.h \ wallet/walletdb.h \ @@ -310,6 +312,7 @@ libbitcoin_wallet_a_SOURCES = \ wallet/feebumper.cpp \ wallet/fees.cpp \ wallet/init.cpp \ + wallet/psbtwallet.cpp \ wallet/rpcdump.cpp \ wallet/rpcwallet.cpp \ wallet/wallet.cpp \ @@ -423,6 +426,7 @@ libbitcoin_common_a_SOURCES = \ netaddress.cpp \ netbase.cpp \ policy/feerate.cpp \ + psbt.cpp \ protocol.cpp \ scheduler.cpp \ script/descriptor.cpp \ diff --git a/src/core_read.cpp b/src/core_read.cpp index 0379098712..536a7f4f17 100644 --- a/src/core_read.cpp +++ b/src/core_read.cpp @@ -4,6 +4,7 @@ #include +#include #include #include #include