From afd20a25f2937fee8d992c279631fa26cde4a7c8 Mon Sep 17 00:00:00 2001 From: Glenn Willen Date: Tue, 5 Mar 2019 18:55:40 -0800 Subject: [PATCH] Move PSBT decoding functions from core_io to psbt.cpp Move PSBT decoding functions from core_io.h/core_read.cpp to psbt.h/psbt.cpp, to deal with a linker issue. --- src/Makefile.am | 2 +- src/core_io.h | 6 ------ src/core_read.cpp | 28 ---------------------------- src/psbt.cpp | 27 +++++++++++++++++++++++++++ src/psbt.h | 5 +++++ 5 files changed, 33 insertions(+), 35 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 14db96325..8d4fbba4f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -430,8 +430,8 @@ libbitcoin_common_a_SOURCES = \ netaddress.cpp \ netbase.cpp \ policy/feerate.cpp \ - psbt.cpp \ protocol.cpp \ + psbt.cpp \ scheduler.cpp \ script/descriptor.cpp \ script/ismine.cpp \ diff --git a/src/core_io.h b/src/core_io.h index ae377eb6e..19fb7b29f 100644 --- a/src/core_io.h +++ b/src/core_io.h @@ -16,7 +16,6 @@ class CBlockHeader; class CScript; class CTransaction; struct CMutableTransaction; -struct PartiallySignedTransaction; class uint256; class UniValue; @@ -37,11 +36,6 @@ bool DecodeHexBlockHeader(CBlockHeader&, const std::string& hex_header); */ bool ParseHashStr(const std::string& strHex, uint256& result); std::vector ParseHexUV(const UniValue& v, const std::string& strName); - -//! Decode a base64ed PSBT into a PartiallySignedTransaction -NODISCARD bool DecodeBase64PSBT(PartiallySignedTransaction& decoded_psbt, const std::string& base64_psbt, std::string& error); -//! Decode a raw (binary blob) PSBT into a PartiallySignedTransaction -NODISCARD bool DecodeRawPSBT(PartiallySignedTransaction& decoded_psbt, const std::string& raw_psbt, std::string& error); int ParseSighashString(const UniValue& sighash); // core_write.cpp diff --git a/src/core_read.cpp b/src/core_read.cpp index 536a7f4f1..a879a375c 100644 --- a/src/core_read.cpp +++ b/src/core_read.cpp @@ -4,7 +4,6 @@ #include -#include #include #include #include