aboutsummaryrefslogtreecommitdiff
path: root/tests/core_tests/chaingen.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/core_tests/chaingen.h')
-rw-r--r--tests/core_tests/chaingen.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/core_tests/chaingen.h b/tests/core_tests/chaingen.h
index eef10312d..add48eebe 100644
--- a/tests/core_tests/chaingen.h
+++ b/tests/core_tests/chaingen.h
@@ -472,6 +472,16 @@ inline bool do_replay_events(std::vector<test_event_entry>& events)
MERROR("Failed to init core");
return false;
}
+
+ // start with a clean pool
+ std::vector<crypto::hash> pool_txs;
+ if (!c.get_pool_transaction_hashes(pool_txs))
+ {
+ MERROR("Failed to flush txpool");
+ return false;
+ }
+ c.get_blockchain_storage().flush_txes_from_pool(std::list<crypto::hash>(pool_txs.begin(), pool_txs.end()));
+
t_test_class validator;
bool ret = replay_events_through_core<t_test_class>(c, events, validator);
c.deinit();