diff options
author | fanquake <fanquake@gmail.com> | 2023-08-21 10:41:36 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-08-21 10:55:35 +0100 |
commit | 723f1c669f9b6babfcb789b7b10bb98d1341da60 (patch) | |
tree | e6347c9765e91c3e6d7318905262fb1e2088fbfb /.github | |
parent | 9b066da8af77f971046a42118fd65046321bed1b (diff) | |
parent | 94a98fbd1d14a4ea10629b917771d50f3191e944 (diff) | |
download | bitcoin-723f1c669f9b6babfcb789b7b10bb98d1341da60.tar.xz |
Merge bitcoin/bitcoin#28218: refactor: Make IsInitialBlockDownload & NotifyHeaderTip not require a Chainstate
94a98fbd1d14a4ea10629b917771d50f3191e944 assumeutxo cleanup: Move IsInitialBlockDownload & NotifyHeaderTip to ChainstateManager (Ryan Ofsky)
Pull request description:
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 https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1246868905 and https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1237552792 as possible followups for that PR.
ACKs for top commit:
MarcoFalke:
re-ACK 94a98fbd1d14a4ea10629b917771d50f3191e944 🐺
naumenkogs:
ACK 94a98fbd1d14a4ea10629b917771d50f3191e944
dergoegge:
reACK 94a98fbd1d14a4ea10629b917771d50f3191e944
Tree-SHA512: 374d6e5c9bbc7564c143f634bd709a4e8f4a42c8d77e7a8554c832acdcf60fa2a134f3ea10827db1a1e0191006496329c0ebf5c64f3ab868398c3722bb7ff56f
Diffstat (limited to '.github')
0 files changed, 0 insertions, 0 deletions