diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-04-25 10:36:44 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-04-25 10:36:00 +0200 |
commit | fa1fdeb2306ab86eb0ae7e8b9764bc37b1b5f04b (patch) | |
tree | d0644964ae4eb1a35d15f9c7320c773676e52929 | |
parent | 8f80092d78f758fdb2e79e2a832a0c7a26fa2da1 (diff) |
fuzz: Ensure prevout is consensus-valid
-rw-r--r-- | src/test/fuzz/script_flags.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/fuzz/script_flags.cpp b/src/test/fuzz/script_flags.cpp index aa911cdeda..1278dc87d4 100644 --- a/src/test/fuzz/script_flags.cpp +++ b/src/test/fuzz/script_flags.cpp @@ -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; |