Skip to content

Commit faacb7e

Browse files
author
MarcoFalke
committed
fuzz: Sanity check result of CheckTransaction
1 parent c857148 commit faacb7e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/test/fuzz/transaction.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,11 @@ FUZZ_TARGET_INIT(transaction, initialize_transaction)
6161
return;
6262
}
6363

64-
TxValidationState state_with_dupe_check;
65-
(void)CheckTransaction(tx, state_with_dupe_check);
64+
{
65+
TxValidationState state_with_dupe_check;
66+
const bool res{CheckTransaction(tx, state_with_dupe_check)};
67+
Assert(res == state_with_dupe_check.IsValid());
68+
}
6669

6770
const CFeeRate dust_relay_fee{DUST_RELAY_TX_FEE};
6871
std::string reason;

0 commit comments

Comments
 (0)