MarcoFalke dbdc83ae01
Merge bitcoin/bitcoin#24909: refactor: Move and rename pindexBestHeader, fHavePruned
f0a2fb3c5dbf3c4bec7faf934baff3e723734b3f scripted-diff: Rename pindexBestHeader, fHavePruned (Carl Dong)
a4014021258319941716d6338c18667462a06280 Clear fHavePruned in BlockManager::Unload() (Carl Dong)
3308ecd3fc254ee4ef9f803c09f00ba4dc968520 move-mostly: Make fHavePruned a BlockMan member (Carl Dong)
c96524113c48553c4bbad63077a25494eca8159e Clear pindexBestHeader in ChainstateManager::Unload() (Carl Dong)
73eedaaacc3b5f2dd791997109f2f5312a894336 style-only: Miscellaneous whitespace changes (Carl Dong)
0d567daf23c9fcb2d95b38913ee45a8b0ba3b027 move-mostly: Make pindexBestHeader a ChainMan member (Carl Dong)
5d670173a32ccdcb25d3a6bf97317f0ac774e0ed validation: Load pindexBestHeader in ChainMan (Carl Dong)

Pull request description:

  Split off from #22564 per Marco's suggestion: https://github.com/bitcoin/bitcoin/pull/22564#issuecomment-1100011503

  This is basically the move-mostly parts of #22564. The overall intent is to move mutable globals manually reset by `::UnloadBlockIndex` into appropriate structs such that they are cleared at the appropriate times. Please read #22564's description for more rationale.

  In summary , this PR moves:
  1. `pindexBestHeader` -> `ChainstateManager::m_best_header`
  2. `fHavePruned` -> `BlockManager::m_have_pruned`

ACKs for top commit:
  ajtowns:
    ACK f0a2fb3c5dbf3c4bec7faf934baff3e723734b3f -- code review only
  MarcoFalke:
    kirby ACK f0a2fb3c5dbf3c4bec7faf934baff3e723734b3f 😋

Tree-SHA512: 8d161701af81af1ff42da1b22a6bef2f8626e8642146bc9c3b27f3a7cd24f4d691910a2392b188ae058fec0611a17304dd73f60da695f53832d327f73d2fc963
2022-04-20 12:13:25 +02:00
..
2021-09-29 14:10:29 +02:00
2022-03-02 12:09:27 +01:00
2022-01-31 16:53:12 +01:00
2021-11-12 11:46:34 +01:00
2021-12-30 19:36:57 +02:00
2022-03-25 08:22:24 +00:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2022-03-24 11:36:37 +01:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2022-02-13 20:59:07 +00:00
2022-01-02 11:40:31 +01:00
2021-12-30 19:36:57 +02:00
2022-01-02 11:40:31 +01:00
2022-01-02 11:52:11 +01:00
2021-12-30 19:36:57 +02:00
2022-01-02 11:13:40 +01:00
2021-12-30 19:36:57 +02:00
2022-03-10 13:05:29 +01:00
2022-01-02 11:40:31 +01:00
2022-01-28 18:07:08 +10:00