diff options
Diffstat (limited to 'tests/core_tests')
-rw-r--r-- | tests/core_tests/bulletproofs.cpp | 1 | ||||
-rw-r--r-- | tests/core_tests/chaingen.cpp | 14 | ||||
-rw-r--r-- | tests/core_tests/chaingen.h | 6 | ||||
-rw-r--r-- | tests/core_tests/multisig.cpp | 2 | ||||
-rw-r--r-- | tests/core_tests/rct.cpp | 1 | ||||
-rw-r--r-- | tests/core_tests/v2_tests.cpp | 1 |
6 files changed, 14 insertions, 11 deletions
diff --git a/tests/core_tests/bulletproofs.cpp b/tests/core_tests/bulletproofs.cpp index fd3f5114b..0a5b98605 100644 --- a/tests/core_tests/bulletproofs.cpp +++ b/tests/core_tests/bulletproofs.cpp @@ -64,7 +64,6 @@ bool gen_bp_tx_validation_base::generate_with(std::vector<test_event_entry>& eve false, "Failed to generate block"); events.push_back(blocks[n]); prev_block = blocks + n; - LOG_PRINT_L0("Initial miner tx " << n << ": " << obj_to_json_str(blocks[n].miner_tx)); } // rewind diff --git a/tests/core_tests/chaingen.cpp b/tests/core_tests/chaingen.cpp index c38ea614c..f935d4f64 100644 --- a/tests/core_tests/chaingen.cpp +++ b/tests/core_tests/chaingen.cpp @@ -393,11 +393,17 @@ void test_generator::fill_nonce(cryptonote::block& blk, const difficulty_type& d const cryptonote::Blockchain *blockchain = nullptr; std::unique_ptr<cryptonote::Blockchain> bc; - if (blk.major_version >= RX_BLOCK_VERSION) + if (blk.major_version >= RX_BLOCK_VERSION && diffic > 1) { - CHECK_AND_ASSERT_THROW_MES(m_events != nullptr, "events not set, cannot compute valid RandomX PoW"); - bc = init_blockchain(*m_events, m_nettype); - blockchain = bc.get(); + if (m_events == nullptr) + { + MDEBUG("events not set, RandomX PoW can fail due to zero seed hash"); + } + else + { + bc = init_blockchain(*m_events, m_nettype); + blockchain = bc.get(); + } } blk.nonce = 0; diff --git a/tests/core_tests/chaingen.h b/tests/core_tests/chaingen.h index a748ce057..80ce7404b 100644 --- a/tests/core_tests/chaingen.h +++ b/tests/core_tests/chaingen.h @@ -47,6 +47,7 @@ #include "include_base_utils.h" #include "common/boost_serialization_helper.h" #include "common/command_line.h" +#include "common/threadpool.h" #include "cryptonote_basic/account_boost_serialization.h" #include "cryptonote_basic/cryptonote_basic.h" @@ -516,7 +517,7 @@ public: , m_events(events) , m_validator(validator) , m_ev_index(0) - , m_tx_relay(cryptonote::relay_method::flood) + , m_tx_relay(cryptonote::relay_method::fluff) { } @@ -549,7 +550,7 @@ public: } else { - m_tx_relay = cryptonote::relay_method::flood; + m_tx_relay = cryptonote::relay_method::fluff; } return true; @@ -775,6 +776,7 @@ inline bool do_replay_events_get_core(std::vector<test_event_entry>& events, cry t_test_class validator; bool ret = replay_events_through_core<t_test_class>(c, events, validator); + tools::threadpool::getInstance().recycle(); // c.deinit(); return ret; } diff --git a/tests/core_tests/multisig.cpp b/tests/core_tests/multisig.cpp index e0c90423d..ba6e2d270 100644 --- a/tests/core_tests/multisig.cpp +++ b/tests/core_tests/multisig.cpp @@ -180,8 +180,6 @@ bool gen_multisig_tx_validation_base::generate_with(std::vector<test_event_entry false, "Failed to generate block"); events.push_back(blocks[n]); prev_block = blocks + n; - LOG_PRINT_L0("Initial miner tx " << n << ": " << obj_to_json_str(blocks[n].miner_tx)); - LOG_PRINT_L0("in block: " << obj_to_json_str(blocks[n])); } // rewind diff --git a/tests/core_tests/rct.cpp b/tests/core_tests/rct.cpp index dc77e408f..23638f62d 100644 --- a/tests/core_tests/rct.cpp +++ b/tests/core_tests/rct.cpp @@ -63,7 +63,6 @@ bool gen_rct_tx_validation_base::generate_with_full(std::vector<test_event_entry false, "Failed to generate block"); events.push_back(blocks[n]); prev_block = blocks + n; - LOG_PRINT_L0("Initial miner tx " << n << ": " << obj_to_json_str(blocks[n].miner_tx)); } // rewind diff --git a/tests/core_tests/v2_tests.cpp b/tests/core_tests/v2_tests.cpp index 8c2b51acf..d00d9b6f4 100644 --- a/tests/core_tests/v2_tests.cpp +++ b/tests/core_tests/v2_tests.cpp @@ -85,7 +85,6 @@ bool gen_v2_tx_validation_base::generate_with(std::vector<test_event_entry>& eve tx_source_entry& src = sources.back(); src.amount = blocks[0].miner_tx.vout[out_idx[out_idx_idx]].amount; - std::cout << "using " << print_money(src.amount) << " output at index " << out_idx[out_idx_idx] << std::endl; for (int m = 0; m <= mixin; ++m) { int idx; if (is_valid_decomposed_amount(src.amount)) |