mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-03-13 06:01:45 +00:00
Fixed lock during block downloading.
This commit is contained in:
parent
26c6fb1d17
commit
290612e9db
@ -21,8 +21,9 @@ 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.
|
||||
// This will happen during initial block downloading, or when we
|
||||
// are out of sync by more than at least SEEDHASH_EPOCH_BLOCKS blocks.
|
||||
LOCK(cs_main);
|
||||
pblockindex = mapBlockSeedHeight.find(seed_height)->second;
|
||||
}
|
||||
if (pblockindex == NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user