|
|
@ -5,7 +5,6 @@
|
|
|
|
#include <node/chainstate.h>
|
|
|
|
#include <node/chainstate.h>
|
|
|
|
|
|
|
|
|
|
|
|
#include <chainparams.h> // for CChainParams
|
|
|
|
#include <chainparams.h> // for CChainParams
|
|
|
|
#include <rpc/blockchain.h> // for RPCNotifyBlockChange
|
|
|
|
|
|
|
|
#include <util/time.h> // for GetTime
|
|
|
|
#include <util/time.h> // for GetTime
|
|
|
|
#include <node/blockstorage.h> // for CleanupBlockRevFiles, fHavePruned, fReindex
|
|
|
|
#include <node/blockstorage.h> // for CleanupBlockRevFiles, fHavePruned, fReindex
|
|
|
|
#include <shutdown.h> // for ShutdownRequested
|
|
|
|
#include <shutdown.h> // for ShutdownRequested
|
|
|
@ -144,7 +143,6 @@ std::optional<ChainstateLoadVerifyError> VerifyLoadedChainstate(ChainstateManage
|
|
|
|
for (CChainState* chainstate : chainman.GetAll()) {
|
|
|
|
for (CChainState* chainstate : chainman.GetAll()) {
|
|
|
|
if (!is_coinsview_empty(chainstate)) {
|
|
|
|
if (!is_coinsview_empty(chainstate)) {
|
|
|
|
const CBlockIndex* tip = chainstate->m_chain.Tip();
|
|
|
|
const CBlockIndex* tip = chainstate->m_chain.Tip();
|
|
|
|
RPCNotifyBlockChange(tip);
|
|
|
|
|
|
|
|
if (tip && tip->nTime > GetTime() + MAX_FUTURE_BLOCK_TIME) {
|
|
|
|
if (tip && tip->nTime > GetTime() + MAX_FUTURE_BLOCK_TIME) {
|
|
|
|
return ChainstateLoadVerifyError::ERROR_BLOCK_FROM_FUTURE;
|
|
|
|
return ChainstateLoadVerifyError::ERROR_BLOCK_FROM_FUTURE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|