This change makes IsInitialBlockDownload
and NotifyHeaderTip
functions no longer tied to individual Chainstate
objects. It makes them work with the ChainstateManager
object instead so code is simpler and it is no longer possible to call them incorrectly with an inactive Chainstate
.
This change also makes m_cached_finished_ibd
caching easier to reason about, because now there is only one cached value instead of two (for background and snapshot chainstates) so the cached IBD state now no longer gets reset when a snapshot is loaded.
There should be no change in behavior because these functions were always called on the active ChainState
objects.
These changes were discussed previously #27746 (review) and #27746 (review) as possible followups for that PR.