Skip to content

Commit ee068ef

Browse files
committed
Fix VerifyScript calls in fuzz/script_flags
1 parent 2949ea9 commit ee068ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/fuzz/script_flags.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void test_one_input(std::vector<uint8_t> buffer)
4242
const TransactionSignatureChecker checker{&tx, i, prevout.nValue, txdata};
4343

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

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

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

6060
assert(ret_fuzzed == ret);

0 commit comments

Comments
 (0)