mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
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.)
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user