You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Look for this block's header in the index like AcceptBlock() will
uint256 hash = pblock->GetHash();
{
LOCK(cs_main);
BlockMap::iterator miSelf = mapBlockIndex.find(hash);
CBlockIndex *pindex = NULL;
if (miSelf != mapBlockIndex.end()) {
// Block header is already known
pindex = miSelf->second;
if (!pblock->cache_init && pindex->cache_init) {
LOCK(pblock->cache_lock); // Probably unnecessary since no concurrent access to pblock is expected
pblock->cache_init = true;
pblock->cache_block_hash = pindex->cache_block_hash;
pblock->cache_PoW_hash = pindex->cache_PoW_hash;
}
}
}
// Look for this block's header in the index like AcceptBlock() will uint256 hash = pblock->GetHash(); { LOCK(cs_main); BlockMap::iterator miSelf = mapBlockIndex.find(hash); CBlockIndex *pindex = NULL; if (miSelf != mapBlockIndex.end()) { // Block header is already known pindex = miSelf->second; if (!pblock->cache_init && pindex->cache_init) { LOCK(pblock->cache_lock); // Probably unnecessary since no concurrent access to pblock is expected pblock->cache_init = true; pblock->cache_block_hash = pindex->cache_block_hash; pblock->cache_PoW_hash = pindex->cache_PoW_hash; } } }
https://github.com/sugarchain-project/sugarchain/pull/22/files#diff-97c3a52bc5fad452d82670a7fd291800bae20c7bc35bb82686c2c0a4ea7b5b98R3502-R3521
The text was updated successfully, but these errors were encountered: