| 3301 | } |
| 3302 | |
| 3303 | bool ChainstateManager::NotifyHeaderTip() |
| 3304 | { |
| 3305 | bool fNotify = false; |
| 3306 | bool fInitialBlockDownload = false; |
| 3307 | CBlockIndex* pindexHeader = nullptr; |
| 3308 | { |
| 3309 | LOCK(GetMutex()); |
| 3310 | pindexHeader = m_best_header; |
| 3311 | |
| 3312 | if (pindexHeader != m_last_notified_header) { |
| 3313 | fNotify = true; |
| 3314 | fInitialBlockDownload = IsInitialBlockDownload(); |
| 3315 | m_last_notified_header = pindexHeader; |
| 3316 | } |
| 3317 | } |
| 3318 | // Send block tip changed notifications without the lock held |
| 3319 | if (fNotify) { |
| 3320 | GetNotifications().headerTip(GetSynchronizationState(fInitialBlockDownload, m_blockman.m_blockfiles_indexed), pindexHeader->nHeight, pindexHeader->nTime, false); |
| 3321 | } |
| 3322 | return fNotify; |
| 3323 | } |
| 3324 | |
| 3325 | static void LimitValidationInterfaceQueue(ValidationSignals& signals) LOCKS_EXCLUDED(cs_main) { |
| 3326 | AssertLockNotHeld(cs_main); |
no test coverage detected