Move txpool to the database

Integration could go further (ie, return_tx_to_pool calls should
not be needed anymore, possibly other things).

poolstate.bin is now obsolete.
This commit is contained in:
moneromooo-monero 2017-05-14 14:06:55 +01:00
parent 9ed496bbc5
commit b52abd1370
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
17 changed files with 847 additions and 289 deletions

View file

@ -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();