mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-05 05:14:51 +02:00
psbt: Check sighash types in SignPSBTInput and take sighash as optional
This commit is contained in:
@@ -2106,7 +2106,6 @@ std::optional<PSBTError> CWallet::FillPSBT(PartiallySignedTransaction& psbtx, bo
|
||||
if (n_signed) {
|
||||
*n_signed = 0;
|
||||
}
|
||||
if (!sighash_type) sighash_type = SIGHASH_DEFAULT;
|
||||
LOCK(cs_wallet);
|
||||
// Get all of the previous transactions
|
||||
for (unsigned int i = 0; i < psbtx.tx->vin.size(); ++i) {
|
||||
@@ -2145,7 +2144,7 @@ std::optional<PSBTError> CWallet::FillPSBT(PartiallySignedTransaction& psbtx, bo
|
||||
}
|
||||
}
|
||||
|
||||
RemoveUnnecessaryTransactions(psbtx, *sighash_type);
|
||||
RemoveUnnecessaryTransactions(psbtx, sighash_type);
|
||||
|
||||
// Complete if every input is now signed
|
||||
complete = true;
|
||||
|
||||
Reference in New Issue
Block a user