From 6b83576388e205116a0ebc67b9949f309eea1207 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Thu, 23 Dec 2021 16:26:15 -0500 Subject: node/chainstate: Use MAX_FUTURE_BLOCK_TIME --- src/node/chainstate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/node') diff --git a/src/node/chainstate.cpp b/src/node/chainstate.cpp index abeebad1a6..0274587e17 100644 --- a/src/node/chainstate.cpp +++ b/src/node/chainstate.cpp @@ -141,7 +141,7 @@ std::optional VerifyLoadedChainstate(ChainstateManage for (CChainState* chainstate : chainman.GetAll()) { if (!is_coinsview_empty(chainstate)) { const CBlockIndex* tip = chainstate->m_chain.Tip(); - if (tip && tip->nTime > get_unix_time_seconds() + 2 * 60 * 60) { + if (tip && tip->nTime > get_unix_time_seconds() + MAX_FUTURE_BLOCK_TIME) { return ChainstateLoadVerifyError::ERROR_BLOCK_FROM_FUTURE; } -- cgit v1.2.3 From 1dd582782d3c182aa952f23ec577f6a0a8672e7b Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Thu, 23 Dec 2021 16:41:53 -0500 Subject: docs: Make LoadChainstate comment more accurate --- src/node/chainstate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/node') diff --git a/src/node/chainstate.h b/src/node/chainstate.h index 11278a0991..4df917a281 100644 --- a/src/node/chainstate.h +++ b/src/node/chainstate.h @@ -50,7 +50,7 @@ enum class ChainstateLoadingError { * this sequence, when we explicitly checked shutdown_requested() at * arbitrary points, one of those calls returned true". Therefore, a * return value other than SHUTDOWN_PROBED does not guarantee that - * shutdown_requested() hasn't been called indirectly. + * shutdown hasn't been called indirectly. * - else * - Success! */ -- cgit v1.2.3