properly configured pos_altblocks_validation

This commit is contained in:
cryptozoidberg 2023-05-20 00:53:53 +02:00
parent 7eea5fab42
commit 17188ab8fb
No known key found for this signature in database
GPG key ID: 22DEB97A54C6FDEC
3 changed files with 10 additions and 0 deletions

View file

@ -2287,6 +2287,13 @@ currency::core_runtime_config test_chain_unit_base::get_runtime_info_for_core()
crc.hard_forks = m_hardforks;
return crc;
}
void test_chain_unit_base::set_hardforks_for_old_tests()
{
m_hardforks.set_hardfork_height(1, 1440);
m_hardforks.set_hardfork_height(2, 1800);
m_hardforks.set_hardfork_height(3, 1801);
}
//------------------------------------------------------------------------------
test_chain_unit_enchanced::test_chain_unit_enchanced()

View file

@ -259,6 +259,8 @@ public:
currency::core_runtime_config get_runtime_info_for_core() const; // tests can override this for special initialization
void set_hardforks_for_old_tests();
private:
callbacks_map m_callbacks;

View file

@ -849,6 +849,7 @@ bool pos_wallet_big_block_test::c1(currency::core& c, size_t ev_index, const std
pos_altblocks_validation::pos_altblocks_validation()
{
test_chain_unit_base::set_hardforks_for_old_tests();
}
bool pos_altblocks_validation::configure_core(currency::core& c, size_t ev_index, const std::vector<test_event_entry>& events)