aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlexander Blair <snipa@jagtech.io>2020-01-24 20:23:24 -0800
committerAlexander Blair <snipa@jagtech.io>2020-01-24 20:23:24 -0800
commit066c327f73c2b66ec03d73521893222520294726 (patch)
tree7419e2c0f0275335dd9d0c8b1f81a4dfd1ade623 /tests
parentMerge pull request #6267 (diff)
parentfix tests bug added in #6110 (diff)
downloadmonero-066c327f73c2b66ec03d73521893222520294726.tar.xz
Merge pull request #6300
6f330865 fix tests bug added in #6110 (Dusan Klinec)
Diffstat (limited to 'tests')
-rw-r--r--tests/core_tests/chaingen.cpp14
1 files changed, 10 insertions, 4 deletions
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;