1
0
Fork 0
forked from lthn/blockchain

coretests: getting rid of set_pos_to_low_timestamp; postponed tests not running

This commit is contained in:
sowle 2022-09-15 19:41:46 +02:00
parent ece5038130
commit 2aa62f43bb
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC
5 changed files with 1 additions and 20 deletions

View file

@ -49,7 +49,6 @@ const crypto::signature invalid_signature = create_invalid_signature();
test_generator::test_generator()
: m_wallet_test_core_proxy(new wallet_test_core_proxy())
, m_do_pos_to_low_timestamp(false)
, m_ignore_last_pow_in_wallets(false)
, m_last_found_timestamp(0)
{
@ -533,8 +532,6 @@ bool test_generator::find_kernel(const std::list<currency::account_base>& accs,
{
starter_timestamp -= 90;
}
if (m_do_pos_to_low_timestamp)
starter_timestamp += 60;
//adjust timestamp starting from timestamp%POS_SCAN_STEP = 0
//starter_timestamp = starter_timestamp - POS_SCAN_WINDOW;
@ -570,18 +567,6 @@ bool test_generator::find_kernel(const std::list<currency::account_base>& accs,
continue;
else
{
if (m_do_pos_to_low_timestamp)
{
if (!m_last_found_timestamp)
{
m_last_found_timestamp = ts;
continue;
}
if(m_last_found_timestamp >= ts)
continue;
}
//found kernel
LOG_PRINT_GREEN("Found kernel: amount=" << print_money(pos_entries[i].amount)
<< ", index=" << pos_entries[i].g_index

View file

@ -525,7 +525,6 @@ public:
static const test_gentime_settings& get_test_gentime_settings() { return m_test_gentime_settings; }
static void set_test_gentime_settings(const test_gentime_settings& s) { m_test_gentime_settings = s; }
static void set_test_gentime_settings_default() { m_test_gentime_settings = m_test_gentime_settings_default; }
void set_pos_to_low_timestamp(bool do_pos_to_low_timestamp) { m_do_pos_to_low_timestamp = do_pos_to_low_timestamp; }
void set_ignore_last_pow_in_wallets(bool ignore_last_pow_in_wallets) { m_ignore_last_pow_in_wallets = ignore_last_pow_in_wallets; }
void set_hardfork_height(size_t hardfork_id, uint64_t h);
void set_hardforks(const currency::hard_forks_descriptor& hardforks);
@ -533,7 +532,6 @@ public:
private:
bool m_do_pos_to_low_timestamp;
bool m_ignore_last_pow_in_wallets;
uint64_t m_last_found_timestamp;

View file

@ -251,7 +251,7 @@ bool gen_and_play_intermitted_by_blockchain_saveload(const char* const genclass_
#define GENERATE_AND_PLAY(genclass) \
if((!postponed_tests.count(#genclass) && run_single_test.empty()) || std::string::npos != std::string(#genclass).find(run_single_test)) \
if((!postponed_tests.count(#genclass) && run_single_test.empty()) || (!run_single_test.empty() && std::string::npos != std::string(#genclass).find(run_single_test)) \
{ \
TIME_MEASURE_START_MS(t); \
++tests_count; \

View file

@ -37,7 +37,6 @@ bool hard_fork_1_bad_pos_source::generate(std::vector<test_event_entry>& events)
DO_CALLBACK(events, "configure_core");
REWIND_BLOCKS_N_WITH_TIME(events, blk_0r, blk_0, miner_acc, CURRENCY_MINED_MONEY_UNLOCK_WINDOW + 5);
generator.set_pos_to_low_timestamp(true);
MAKE_TX(events, tx_1, miner_acc, pos_miner_acc_before_pow, 1000000000000, blk_0r);
MAKE_NEXT_BLOCK_TX1(events, blk_pow_tx1, blk_0r, miner_acc, tx_1);
MAKE_TX(events, tx_2, preminer_acc, pos_miner_acc_after_pow, 1000000000000, blk_pow_tx1);

View file

@ -43,7 +43,6 @@ bool hard_fork_1_cumulative_difficulty_base::generate(std::vector<test_event_ent
last_block = next_blk_pow;
}
generator.set_pos_to_low_timestamp(true);
last_block = blk_0r;
for (size_t i = 0; i != 20; i++)
{