mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-24 02:42:12 +02:00
fuzz: Ensure prevout is consensus-valid
This commit is contained in:
parent
8f80092d78
commit
fa1fdeb230
@ -41,6 +41,10 @@ FUZZ_TARGET_INIT(script_flags, initialize_script_flags)
|
||||
for (unsigned i = 0; i < tx.vin.size(); ++i) {
|
||||
CTxOut prevout;
|
||||
ds >> prevout;
|
||||
if (!MoneyRange(prevout.nValue)) {
|
||||
// prevouts should be consensus-valid
|
||||
prevout.nValue = 1;
|
||||
}
|
||||
spent_outputs.push_back(prevout);
|
||||
}
|
||||
PrecomputedTransactionData txdata;
|
||||
|
Loading…
x
Reference in New Issue
Block a user