diff --git a/src/validation.cpp b/src/validation.cpp --- a/src/validation.cpp +++ b/src/validation.cpp @@ -3719,10 +3719,6 @@ return true; } - // This function is ran once all block data is found. If we don't already - // have the block, record when we first saw all the data. - pindex->nTimeBlockReceived = GetTime(); - // Compare block header timestamps and received times of the block and the // chaintip. If they have the same chain height, use these diffs as a // tie-breaker, attempting to pick the more honestly-mined block. @@ -3858,6 +3854,10 @@ FlushStateToDisk(config.GetChainParams(), state, FLUSH_STATE_NONE); } + // This function is ran once all block data is found. If we don't already + // have the block, record when we first saw all the data. + pindex->nTimeBlockReceived = GetTime(); + return true; }