enable block cache

This commit is contained in:
Evan Duffield 2015-08-02 12:16:09 -07:00
parent 34d5fb1d75
commit 9a18014987

View File

@ -3108,15 +3108,15 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc
CBlockIndex *pindex = NULL; CBlockIndex *pindex = NULL;
// TODO : ENABLE BLOCK CACHE IN SPECIFIC CASES // TODO : ENABLE BLOCK CACHE IN SPECIFIC CASES
// if (miSelf != mapBlockIndex.end()) { if (miSelf != mapBlockIndex.end()) {
// // Block header is already known. // Block header is already known.
// pindex = miSelf->second; pindex = miSelf->second;
// if (ppindex) if (ppindex)
// *ppindex = pindex; *ppindex = pindex;
// if (pindex->nStatus & BLOCK_FAILED_MASK) if (pindex->nStatus & BLOCK_FAILED_MASK)
// return state.Invalid(error("%s : block is marked invalid", __func__), 0, "duplicate"); return state.Invalid(error("%s : block is marked invalid", __func__), 0, "duplicate");
// return true; return true;
// } }
if (!CheckBlockHeader(block, state)) if (!CheckBlockHeader(block, state))
return false; return false;