diff options
| author | Glenn Willen <[email protected]> | 2019-01-29 22:51:56 -0800 |
|---|---|---|
| committer | Glenn Willen <[email protected]> | 2019-02-11 14:08:04 -0800 |
| commit | 78b9893d020e8b1351565f1adbf591cb32f6dc90 (patch) | |
| tree | 599c5a1b8627fb1681b038d3b89aef07f3ea8663 /src/rpc/rawtransaction.cpp | |
| parent | Switch away from exceptions in refactored tx code (diff) | |
| download | discoin-78b9893d020e8b1351565f1adbf591cb32f6dc90.tar.xz discoin-78b9893d020e8b1351565f1adbf591cb32f6dc90.zip | |
Remove op== on PSBTs; check compatibility in Merge
Remove the op== on PartiallySignedTransaction, which only checks that the
CTransactions are equal. Instead, check this directly in Merge, and return
false if the CTransactions are not equal (so the PSBTs cannot be merged.)
Diffstat (limited to 'src/rpc/rawtransaction.cpp')
| -rw-r--r-- | src/rpc/rawtransaction.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index bc836614a..4205a3d10 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -1481,10 +1481,9 @@ UniValue combinepsbt(const JSONRPCRequest& request) // Merge for (auto it = std::next(psbtxs.begin()); it != psbtxs.end(); ++it) { - if (*it != merged_psbt) { + if (!merged_psbt.Merge(*it)) { throw JSONRPCError(RPC_INVALID_PARAMETER, "PSBTs do not refer to the same transactions."); } - merged_psbt.Merge(*it); } if (!merged_psbt.IsSane()) { throw JSONRPCError(RPC_INVALID_PARAMETER, "Merged PSBT is inconsistent"); |