fuzz: Ensure prevout is consensus-valid

This commit is contained in:
MarcoFalke 2021-04-25 10:36:44 +02:00
parent 8f80092d78
commit fa1fdeb230
No known key found for this signature in database
GPG key ID: CE2B75697E69A548

View file

@ -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;