This commit is contained in:
jl777
2017-03-24 06:06:45 +02:00
parent 354dc58a3b
commit 3d8d574eac

View File

@@ -381,14 +381,14 @@ void UpdateBlockAvailability(NodeId nodeid, const uint256 &hash) {
CNodeState *state = State(nodeid); CNodeState *state = State(nodeid);
assert(state != NULL); assert(state != NULL);
ProcessBlockAvailability(nodeid); /*ProcessBlockAvailability(nodeid);
BlockMap::iterator it = mapBlockIndex.find(hash); BlockMap::iterator it = mapBlockIndex.find(hash);
if (it->size() != 0 && it != mapBlockIndex.end() && it->second->nChainWork > 0) { if (it != mapBlockIndex.end() && it->second->nChainWork > 0) {
// An actually better block was announced. // An actually better block was announced.
if (state->pindexBestKnownBlock == NULL || it->second->nChainWork >= state->pindexBestKnownBlock->nChainWork) if (state->pindexBestKnownBlock == NULL || it->second->nChainWork >= state->pindexBestKnownBlock->nChainWork)
state->pindexBestKnownBlock = it->second; state->pindexBestKnownBlock = it->second;
} else } else*/
{ {
// An unknown block was announced; just assume that the latest one is the best one. // An unknown block was announced; just assume that the latest one is the best one.
state->hashLastUnknownBlock = hash; state->hashLastUnknownBlock = hash;