mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Merge bitcoin/bitcoin#25595: Verify PSBT inputs rather than check for fields being empty
e133264c5bAdd test for PSBT input verification (Greg Sanders)d25699280aVerify PSBT inputs rather than check for fields being empty (Greg Sanders) Pull request description: In a few keys spots, PSBT finality is checked by looking for non-empty witness data. This complicates a couple things: 1) Empty data can be valid in certain cases 2) User may be passed bogus final data by a counterparty during PSBT work happening, and end up with incorrect signatures that they may not be able to check in other contexts if the UTXO doesn't exist yet in chain/mempool, timelocks, etc. On the whole I think these heavier checks are worth it in case someone is actually assuming the signatures are correct if our API is saying so. ACKs for top commit: achow101: ACKe133264c5bTree-SHA512: 9de4fbb0be1257b081781f5df908fd55666e3acd5c4e36beb3b3f2f5a6aed69ff77068c44cde6127e159e773293fd9ced4c0bb47e693969f337e74dc8af030da
This commit is contained in:
@@ -59,7 +59,7 @@ PSBTAnalysis AnalyzePSBT(PartiallySignedTransaction psbtx)
|
||||
}
|
||||
|
||||
// Check if it is final
|
||||
if (!utxo.IsNull() && !PSBTInputSigned(input)) {
|
||||
if (!PSBTInputSignedAndVerified(psbtx, i, &txdata)) {
|
||||
input_analysis.is_final = false;
|
||||
|
||||
// Figure out what is missing
|
||||
|
||||
Reference in New Issue
Block a user