mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-31 10:56:03 +02:00
Merge bitcoin/bitcoin#30357: Fix cases of calls to FillPSBT errantly returning complete=true
7e36dca657test: add test for modififed walletprocesspsbt calls (willcl-ark)39cea21ec5wallet: fix FillPSBT errantly showing as complete (willcl-ark) Pull request description: Fixes: #30077 Fix cases of calls to `FillPSBT` returning `complete=true` when it's not the case. This can happen when some inputs have been signed but the transaction is subsequently modified, e.g. in the context of PayJoins. Also fixes a related bug where a finalized hex string is attempted to be added during `walletprocesspsbt` but a CHECK_NONFATAL causes an abort. ACKs for top commit: achow101: ACK7e36dca657ismaelsadeeq: Tested ACK7e36dca657pinheadmz: re-ACK7e36dca657Tree-SHA512: e35d19789899c543866d86d513506494d672e4bed9aa36a995dbec4e72f0a8ec5536b57c4a940a18002ae4a8efd0b007c77ba64e57cd52af98e4ac0e7bf650d6
This commit is contained in:
@@ -2225,8 +2225,8 @@ std::optional<PSBTError> CWallet::FillPSBT(PartiallySignedTransaction& psbtx, bo
|
||||
|
||||
// Complete if every input is now signed
|
||||
complete = true;
|
||||
for (const auto& input : psbtx.inputs) {
|
||||
complete &= PSBTInputSigned(input);
|
||||
for (size_t i = 0; i < psbtx.inputs.size(); ++i) {
|
||||
complete &= PSBTInputSignedAndVerified(psbtx, i, &txdata);
|
||||
}
|
||||
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user