mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-26 11:13:23 -03:00
fuzz: Ensure prevout is consensus-valid
This commit is contained in:
parent
8f80092d78
commit
fa1fdeb230
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue