refactor: move load block thread into ChainstateManager#21030
refactor: move load block thread into ChainstateManager#21030fanquake wants to merge 1 commit intobitcoin:masterfrom
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
f538c25 to
be70656
Compare
This is a diff of Marcos from bitcoin#19197, which probably should have just been used at the time. After this change, and bitcoin#21016, we'll have no more global thread(Group)s hanging out in init. Co-authored-by: MarcoFalke <[email protected]>
be70656 to
e3341df
Compare
|
Concept ACK. @dongcarl Does moving block loading into the chainstate manager align with your goals ? Edit: I personally think it should be factored out, but not necessarily to validation.cpp/h, we might want a separate "block storage handling" component where ThreadImport and such can move. |
I believe so. After a cursory look at this PR, I think the |
|
Done in #21575 |
fadcd3f doc: Remove irrelevant link to GitHub (MarcoFalke) fa121b6 blockstorage: [refactor] Use chainman reference where possible (MarcoFalke) fa0c7d9 move-only: Move *Disk functions to blockstorage (MarcoFalke) fa91b2b move-only: Move AbortNode to shutdown (MarcoFalke) fa413f0 move-only: Move ThreadImport to blockstorage (MarcoFalke) faf843c refactor: Move load block thread into ChainstateManager (MarcoFalke) Pull request description: This picks up the closed pull request #21030 and is the first step toward fixing #21220. The basic idea is to move all disk access into a separate module with benefits: * Breaking down the massive files init.cpp and validation.cpp into logical units * Creating a standalone-module to reduce the mental complexity * Pave the way to fix validation related circular dependencies * Pave the way to mock disk access for testing, especially where it is performance critical (like fuzzing) ACKs for top commit: promag: Code review ACK fadcd3f, checked (almost) moved only changes. This is a nice tidy up change and doesn't change behavior. Easily reviewed commit by commit. jamesob: ACK fadcd3f ([`jamesob/ackr/21575.1.MarcoFalke.refactor_create_blocksto`](https://github.com/jamesob/bitcoin/tree/ackr/21575.1.MarcoFalke.refactor_create_blocksto)) ryanofsky: Code review ACK fadcd3f. New organization makes sense, moves extraneous things outside of validation.cpp. PR is also easy to review with helpfully split up moveonly commits. Tree-SHA512: 917996592b6d8f9998289d8cb2b1b78b23d1fdb3b07216c9caec1380df33baa09dc2c1e706da669d440b497e79c9c62a01ca20dc202df5ad974a75f3ef7a143b
This is a diff of Marcos from #19197, which probably should have just
been used at the time. After this change, and #21016, we'll have no more
global thread(Group)s hanging out in init.
Co-authored-by: MarcoFalke [email protected]