Commit 93d21da
committed
Merge #7008: refactor: separate network and consensus logic 3/N [governance]
a67300c fix: multiple CI failures (Konstantin Akimov)
be62366 refactor: pass connman in constructor of NetHandler's child which need it (Konstantin Akimov)
dc08ef4 refactor: break circular dependency of CMasternodeManager over net.h (Konstantin Akimov)
9ac269c refactor: move ProcessMessage from CMasternodeSync to SyncManager (Konstantin Akimov)
b9aec50 refactor: split NetGovernance to SyncManager and NetGovernance (Konstantin Akimov)
106827c fmt: clang-format (Konstantin Akimov)
fc21e51 refactor: move ProcessMessage from CGovernanceManager to NetGovernance (Konstantin Akimov)
fa0e173 refactor: add CConnman to NetHandler's ProcessMessage (Konstantin Akimov)
7f3d16d chore: apply clang-format and adjust logs (Konstantin Akimov)
461392e refactor: move RequestGovernanceObjectVotes to NetGovernance to drop dependency governance on net_processing (Konstantin Akimov)
8425ca1 fix: reduce scope of ::cs_main during PeerGetRequestedObjectCount (Konstantin Akimov)
77faacc refactor: split FetchGovernanceObjectVotes to own member of CGovernanceManager (Konstantin Akimov)
e7f9218 refactor: drop a wrapper RequestGovernanceObjectVotes for a single node (Konstantin Akimov)
eb9607e refactor: move DEFAULT_SYNC_MEMPOOL form validation.h to masternode/sync.h (Konstantin Akimov)
be0be6b chore: fix clang-format and adjust log messages (Konstantin Akimov)
e878592 refactor: drop dependency of masternode/sync on governance by moving relevant code to NetGovernance (Konstantin Akimov)
7e4849a refactor: inline method CleanOrphanObjects to CGovernanceManager::RequestOrphanObjects (Konstantin Akimov)
285def6 refactor: use NetHandler to move scheduler & partially network related code from governance (Konstantin Akimov)
78c6062 refactor: drop unused includes and forward declarations from masternode/sync and governance/governance (Konstantin Akimov)
91129d4 refactor: drop dead code with ERROR_TXINDEX_DISABLED_WHEN_GOV_ENABLED (Konstantin Akimov)
Pull request description:
## Issue being fixed or feature implemented
Separation of consensus & chain code and network & node in Dash Core is blocked by tight connection of network and consensus code; in components such as `llmq::CSigningManager`, `llmq::CSigSharesManager`, `coinjoin::client`, `coinjoin::server`, `governance/`, `llmq::CInstantSendManager`, etc.
It blocks backport's of bitcoin related to 'kernel' project.
## What was done?
This PR addresses a dependency of `CGovernanceManager` on `PeerManager`.
`CMasternodeSync` is refactored to pure state-machine without dependencies on net.h.
It is a split from proof-of-concept PR #6934
Prior work: #6959 #6992
## How Has This Been Tested?
Run unit & functional tests.
Run a linter `test/lint/lint-circular-dependencies.py`
Overall conception is tested in #6934 as potentially successful to finish separation of network & consensus code.
## Breaking Changes
N/A
## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e tests
- [x] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone
ACKs for top commit:
UdjinM6:
light ACK a67300c
Tree-SHA512: dc8548268cd3156848e50fd338776be676c63d966fd6b576fb1f0f3b5416afd6d9b4a4d17f6df7cd1cf3b0c4f8908b4848e196dad808f430207d75e2adf6bbe0File tree
17 files changed
+726
-594
lines changed- src
- governance
- masternode
- node
- test/util
- test/lint
17 files changed
+726
-594
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | 223 | | |
| 224 | + | |
| 225 | + | |
225 | 226 | | |
226 | 227 | | |
227 | 228 | | |
| |||
311 | 312 | | |
312 | 313 | | |
313 | 314 | | |
| 315 | + | |
314 | 316 | | |
315 | 317 | | |
316 | 318 | | |
| |||
508 | 510 | | |
509 | 511 | | |
510 | 512 | | |
| 513 | + | |
511 | 514 | | |
512 | 515 | | |
513 | 516 | | |
| |||
567 | 570 | | |
568 | 571 | | |
569 | 572 | | |
| 573 | + | |
570 | 574 | | |
571 | 575 | | |
572 | 576 | | |
| |||
0 commit comments