enable block cache
This commit is contained in:
parent
34d5fb1d75
commit
9a18014987
18
src/main.cpp
18
src/main.cpp
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user