forked from lthn/blockchain
coretests: test_chain_unit_enchanced::remove_stuck_txs added
This commit is contained in:
parent
8246498d94
commit
c7004d0420
2 changed files with 12 additions and 0 deletions
|
|
@ -2057,6 +2057,7 @@ test_chain_unit_enchanced::test_chain_unit_enchanced()
|
|||
REGISTER_CALLBACK_METHOD(test_chain_unit_enchanced, check_tx_pool_empty);
|
||||
REGISTER_CALLBACK_METHOD(test_chain_unit_enchanced, check_tx_pool_count);
|
||||
REGISTER_CALLBACK_METHOD(test_chain_unit_enchanced, print_tx_pool);
|
||||
REGISTER_CALLBACK_METHOD(test_chain_unit_enchanced, remove_stuck_txs);
|
||||
REGISTER_CALLBACK_METHOD(test_chain_unit_enchanced, check_offers_count);
|
||||
}
|
||||
|
||||
|
|
@ -2122,6 +2123,16 @@ bool test_chain_unit_enchanced::print_tx_pool(currency::core& c, size_t ev_index
|
|||
return true;
|
||||
}
|
||||
|
||||
bool test_chain_unit_enchanced::remove_stuck_txs(currency::core& c, size_t ev_index, const std::vector<test_event_entry>& events)
|
||||
{
|
||||
size_t tx_count_before = c.get_pool_transactions_count();
|
||||
bool r = c.get_tx_pool().remove_stuck_transactions();
|
||||
CHECK_AND_ASSERT_MES(r, false, "remove_stuck_transactions() failed");
|
||||
|
||||
LOG_PRINT_L0("stuck txs removed from the pool, pool tx count: " << tx_count_before << " -> " << c.get_pool_transactions_count());
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string print_market(bc_services::bc_offers_service* offers_service)
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
|
|
|||
|
|
@ -297,6 +297,7 @@ public:
|
|||
bool check_tx_pool_empty(currency::core& c, size_t ev_index, const std::vector<test_event_entry>& events);
|
||||
bool check_tx_pool_count(currency::core& c, size_t ev_index, const std::vector<test_event_entry>& events);
|
||||
bool print_tx_pool(currency::core& c, size_t ev_index, const std::vector<test_event_entry>& events);
|
||||
bool remove_stuck_txs(currency::core& c, size_t ev_index, const std::vector<test_event_entry>& events);
|
||||
bool check_offers_count(currency::core& c, size_t ev_index, const std::vector<test_event_entry>& events);
|
||||
|
||||
protected:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue