Merge pull request #2222

878205f1 core: fix lock ordering bug at init time (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2017-08-07 15:11:51 +02:00
commit a2dd125b1e
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD

View file

@ -279,7 +279,8 @@ uint64_t Blockchain::get_current_blockchain_height() const
bool Blockchain::init(BlockchainDB* db, const bool testnet, const cryptonote::test_options *test_options)
{
LOG_PRINT_L3("Blockchain::" << __func__);
CRITICAL_REGION_LOCAL(m_blockchain_lock);
CRITICAL_REGION_LOCAL(m_tx_pool);
CRITICAL_REGION_LOCAL1(m_blockchain_lock);
bool fakechain = test_options != NULL;