aboutsummaryrefslogtreecommitdiff
path: root/src/node
diff options
context:
space:
mode:
authorGlenn Willen <gwillen@nerdnet.org>2019-01-09 03:08:32 -0800
committerGlenn Willen <gwillen@nerdnet.org>2019-02-11 14:08:04 -0800
commit102faad81efa1cb12c29c466cfe81fc8c7351e1d (patch)
tree7353c37cc34161eb350e41cac2f1a7e1e8b8ee23 /src/node
parent78b9893d020e8b1351565f1adbf591cb32f6dc90 (diff)
Factor out combine / finalize / extract PSBT helpers
Refactor the new CombinePSBT, FinalizePSBT, and FinalizeAndExtractPSBT general-purpose functions out of the combinepsbt and finalizepsbt RPCs, for use in the GUI code.
Diffstat (limited to 'src/node')
-rw-r--r--src/node/transaction.cpp2
-rw-r--r--src/node/transaction.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/node/transaction.cpp b/src/node/transaction.cpp
index 6c4efb3d26..c9cdd0d1cd 100644
--- a/src/node/transaction.cpp
+++ b/src/node/transaction.cpp
@@ -29,6 +29,8 @@ const char* TransactionErrorString(const TransactionError err)
return "AcceptToMemoryPool failed";
case TransactionError::INVALID_PSBT:
return "PSBT is not sane";
+ case TransactionError::PSBT_MISMATCH:
+ return "PSBTs not compatible (different transactions)";
case TransactionError::SIGHASH_MISMATCH:
return "Specified sighash value does not match existing value";
diff --git a/src/node/transaction.h b/src/node/transaction.h
index 83354d9400..3b0cbba98b 100644
--- a/src/node/transaction.h
+++ b/src/node/transaction.h
@@ -18,6 +18,7 @@ enum class TransactionError {
MEMPOOL_REJECTED,
MEMPOOL_ERROR,
INVALID_PSBT,
+ PSBT_MISMATCH,
SIGHASH_MISMATCH,
ERROR_COUNT