mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-08-26 14:32:17 +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.
|
// To fix the chainActive not defined error.
|
||||||
CChain chainActive;
|
CChain chainActive;
|
||||||
typedef std::map<uint64_t, CBlockIndex*> BlockSeedHeightMap;
|
typedef std::map<uint64_t, CBlockIndex*> BlockSeedHeightMap;
|
||||||
|
CCriticalSection cs_main;
|
||||||
BlockSeedHeightMap mapBlockSeedHeight;
|
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];
|
CBlockIndex* pblockindex = chainActive[seed_height];
|
||||||
if (pblockindex == NULL) {
|
if (pblockindex == NULL) {
|
||||||
|
AssertLockHeld(cs_main);
|
||||||
// This will only happens during initial block download.
|
// This will only happens during initial block download.
|
||||||
pblockindex = mapBlockSeedHeight.find(seed_height)->second;
|
pblockindex = mapBlockSeedHeight.find(seed_height)->second;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user