This commit is contained in:
jl777
2017-03-24 06:03:46 +02:00
parent 2f852a342c
commit 5aa4223f1e

View File

@@ -384,7 +384,7 @@ void UpdateBlockAvailability(NodeId nodeid, const uint256 &hash) {
ProcessBlockAvailability(nodeid);
BlockMap::iterator it = mapBlockIndex.find(hash);
if (it->second != 0 && it != mapBlockIndex.end() && it->second->nChainWork > 0) {
if (it->size() != 0 && it != mapBlockIndex.end() && it->second->nChainWork > 0) {
// An actually better block was announced.
if (state->pindexBestKnownBlock == NULL || it->second->nChainWork >= state->pindexBestKnownBlock->nChainWork)
state->pindexBestKnownBlock = it->second;