aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-10-08 10:34:24 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-10-08 11:37:58 +0000
commita39c0358466e3816885ea0786b3a0e997fdde673 (patch)
tree65db308a6f717ae1cc26d4f399923149d7cd2eda /src
parentMerge pull request #4036 (diff)
downloadmonero-a39c0358466e3816885ea0786b3a0e997fdde673.tar.xz
blockchain: add check test options are given for fakechain mode
Coverity 188616
Diffstat (limited to 'src')
-rw-r--r--src/cryptonote_core/blockchain.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index 6c6e024e4..96f3bc7e5 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -341,6 +341,9 @@ uint64_t Blockchain::get_current_blockchain_height() const
bool Blockchain::init(BlockchainDB* db, const network_type nettype, bool offline, const cryptonote::test_options *test_options, difficulty_type fixed_difficulty, const GetCheckpointsCallback get_checkpoints/* = nullptr*/)
{
LOG_PRINT_L3("Blockchain::" << __func__);
+
+ CHECK_AND_ASSERT_MES(nettype != FAKECHAIN || test_options, false, "fake chain network type used without options");
+
CRITICAL_REGION_LOCAL(m_tx_pool);
CRITICAL_REGION_LOCAL1(m_blockchain_lock);