mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-13 08:38:15 +00:00
Added lock debugging for mapBlockSeedHeight.
This commit is contained in:
parent
103d76c0b5
commit
ace637e88c
@ -34,6 +34,7 @@ static const int CONTINUE_EXECUTION=-1;
|
||||
// To fix the chainActive not defined error.
|
||||
CChain chainActive;
|
||||
typedef std::map<uint64_t, CBlockIndex*> BlockSeedHeightMap;
|
||||
CCriticalSection cs_main;
|
||||
BlockSeedHeightMap mapBlockSeedHeight;
|
||||
|
||||
//
|
||||
|
@ -21,6 +21,7 @@ static void cn_get_block_hash_by_height(uint64_t seed_height, char cnHash[32])
|
||||
{
|
||||
CBlockIndex* pblockindex = chainActive[seed_height];
|
||||
if (pblockindex == NULL) {
|
||||
AssertLockHeld(cs_main);
|
||||
// This will only happens during initial block download.
|
||||
pblockindex = mapBlockSeedHeight.find(seed_height)->second;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user