diff --git a/tests/core_tests/chaingen.cpp b/tests/core_tests/chaingen.cpp index ddeef09d..41c149bc 100644 --- a/tests/core_tests/chaingen.cpp +++ b/tests/core_tests/chaingen.cpp @@ -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& 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& 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 diff --git a/tests/core_tests/chaingen.h b/tests/core_tests/chaingen.h index 88019806..b7f4e97d 100644 --- a/tests/core_tests/chaingen.h +++ b/tests/core_tests/chaingen.h @@ -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; diff --git a/tests/core_tests/chaingen_main.cpp b/tests/core_tests/chaingen_main.cpp index fb1dc8e8..90fe3ff4 100644 --- a/tests/core_tests/chaingen_main.cpp +++ b/tests/core_tests/chaingen_main.cpp @@ -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; \ diff --git a/tests/core_tests/hard_fork_1_bad_pos_source.cpp b/tests/core_tests/hard_fork_1_bad_pos_source.cpp index b60a1d08..3c79512c 100644 --- a/tests/core_tests/hard_fork_1_bad_pos_source.cpp +++ b/tests/core_tests/hard_fork_1_bad_pos_source.cpp @@ -37,7 +37,6 @@ bool hard_fork_1_bad_pos_source::generate(std::vector& 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); diff --git a/tests/core_tests/hard_fork_1_consensus_test.cpp b/tests/core_tests/hard_fork_1_consensus_test.cpp index 09753840..dd672019 100644 --- a/tests/core_tests/hard_fork_1_consensus_test.cpp +++ b/tests/core_tests/hard_fork_1_consensus_test.cpp @@ -43,7 +43,6 @@ bool hard_fork_1_cumulative_difficulty_base::generate(std::vector