Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/test/fuzz/script_flags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void test_one_input(std::vector<uint8_t> buffer)
const TransactionSignatureChecker checker{&tx, i, prevout.nValue, txdata};

ScriptError serror;
const bool ret = VerifyScript(tx.vin.at(i).scriptSig, prevout.scriptPubKey, &tx.vin.at(i).scriptWitness, verify_flags, checker, &serror);
const bool ret = VerifyScript(tx.vin.at(i).scriptSig, prevout.scriptPubKey, &tx.witness.vtxinwit.at(i).scriptWitness, verify_flags, checker, &serror);
assert(ret == (serror == SCRIPT_ERR_OK));

// Verify that removing flags from a passing test or adding flags to a failing test does not change the result
Expand All @@ -54,7 +54,7 @@ void test_one_input(std::vector<uint8_t> buffer)
if (!IsValidFlagCombination(verify_flags)) return;

ScriptError serror_fuzzed;
const bool ret_fuzzed = VerifyScript(tx.vin.at(i).scriptSig, prevout.scriptPubKey, &tx.vin.at(i).scriptWitness, verify_flags, checker, &serror_fuzzed);
const bool ret_fuzzed = VerifyScript(tx.vin.at(i).scriptSig, prevout.scriptPubKey, &tx.witness.vtxinwit.at(i).scriptWitness, verify_flags, checker, &serror_fuzzed);
assert(ret_fuzzed == (serror_fuzzed == SCRIPT_ERR_OK));

assert(ret_fuzzed == ret);
Expand Down