mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-09 19:37:27 -03:00
wallet: fix FillPSBT errantly showing as complete
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.
Reported in #30077.
Github-Pull: #30357
Rebased-From: 39cea21ec5
This commit is contained in:
parent
05192ba84c
commit
f22b9ca70c
1 changed files with 2 additions and 2 deletions
|
@ -2184,8 +2184,8 @@ TransactionError CWallet::FillPSBT(PartiallySignedTransaction& psbtx, bool& comp
|
|||
|
||||
// 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 TransactionError::OK;
|
||||
|
|
Loading…
Reference in a new issue