| 3291 | } |
| 3292 | |
| 3293 | void ChainstateManager::UpdateIBDStatus() |
| 3294 | { |
| 3295 | AssertLockHeld(cs_main); |
| 3296 | if (!m_cached_is_ibd.load(std::memory_order_relaxed)) return; |
| 3297 | if (m_blockman.LoadingBlocks()) return; |
| 3298 | if (!CurrentChainstate().m_chain.IsTipRecent(MinimumChainWork(), m_options.max_tip_age)) return; |
| 3299 | LogInfo("Leaving InitialBlockDownload (latching to false)"); |
| 3300 | m_cached_is_ibd.store(false, std::memory_order_relaxed); |
| 3301 | } |
| 3302 | |
| 3303 | bool ChainstateManager::NotifyHeaderTip() |
| 3304 | { |