diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-05-17 10:12:36 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-05-17 10:04:53 +0200 |
commit | faacb7eadb04a8af666e7bb59bcd79915fe3a80a (patch) | |
tree | 89a9240a618825e5c019f2bf10c03682e7d11929 /src/test | |
parent | c8571486364d6e9ca8c86bd1c81e230ca64f8904 (diff) |
fuzz: Sanity check result of CheckTransaction
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/fuzz/transaction.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/test/fuzz/transaction.cpp b/src/test/fuzz/transaction.cpp index 17e4405a13..797b9cea3e 100644 --- a/src/test/fuzz/transaction.cpp +++ b/src/test/fuzz/transaction.cpp @@ -61,8 +61,11 @@ FUZZ_TARGET_INIT(transaction, initialize_transaction) return; } - TxValidationState state_with_dupe_check; - (void)CheckTransaction(tx, state_with_dupe_check); + { + TxValidationState state_with_dupe_check; + const bool res{CheckTransaction(tx, state_with_dupe_check)}; + Assert(res == state_with_dupe_check.IsValid()); + } const CFeeRate dust_relay_fee{DUST_RELAY_TX_FEE}; std::string reason; |