psbt: use sighash type field to determine whether to remove non-witness utxos

Since the sighash type field is written for atypical sighash types, we
can look at that field to figure out whether the psbt contains
unnecessary transactions.
This commit is contained in:
Ava Chow
2025-01-21 18:02:15 -05:00
parent 28781b5f06
commit 2b7682c372
4 changed files with 33 additions and 29 deletions

View File

@@ -244,7 +244,7 @@ PartiallySignedTransaction ProcessPSBT(const std::string& psbt_string, const std
UpdatePSBTOutput(provider, psbtx, i);
}
RemoveUnnecessaryTransactions(psbtx, /*sighash_type=*/std::nullopt);
RemoveUnnecessaryTransactions(psbtx);
return psbtx;
}