aboutsummaryrefslogtreecommitdiff
path: root/tests/core_tests/chaingen.h
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-05-30 21:12:44 +0200
committerRiccardo Spagni <ric@spagni.net>2017-05-30 21:12:44 +0200
commit545e2b003c6a4930e9f18e6d5696c2cd85a5cb22 (patch)
tree3c156bab193a4d1c01ef20a2764b4439f01e3699 /tests/core_tests/chaingen.h
parentMerge pull request #2015 (diff)
parentMove txpool to the database (diff)
downloadmonero-545e2b003c6a4930e9f18e6d5696c2cd85a5cb22.tar.xz
Merge pull request #1982
b52abd13 Move txpool to the database (moneromooo-monero)
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();