Skip to content

Commit

Permalink
fuzz: Ensure prevout is consensus-valid
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoFalke committed Apr 25, 2021
1 parent 8f80092 commit fa1fdeb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/test/fuzz/script_flags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fa1fdeb

Please sign in to comment.