blockchain: add check test options are given for fakechain mode

Coverity 188616
This commit is contained in:
moneromooo-monero 2018-10-08 10:34:24 +00:00
parent e19652df51
commit a39c035846
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 3 additions and 0 deletions

View File

@ -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);