mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 03:47:29 -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.
This commit is contained in:
parent
04d63fb8c3
commit
39cea21ec5
1 changed files with 2 additions and 2 deletions
|
@ -2225,8 +2225,8 @@ std::optional<PSBTError> CWallet::FillPSBT(PartiallySignedTransaction& psbtx, bo
|
||||||
|
|
||||||
// Complete if every input is now signed
|
// Complete if every input is now signed
|
||||||
complete = true;
|
complete = true;
|
||||||
for (const auto& input : psbtx.inputs) {
|
for (size_t i = 0; i < psbtx.inputs.size(); ++i) {
|
||||||
complete &= PSBTInputSigned(input);
|
complete &= PSBTInputSignedAndVerified(psbtx, i, &txdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
|
|
Loading…
Reference in a new issue