Commit 156329e
committed
Merge #7104: refactor: move ownerships of mnhfman, cpoolman inside CChainstateHelper where it belongs to
7da6d06 fmt: clang-format for active/context and other files (Konstantin Akimov)
46302be refactor: code move only; validation of protx transactions are moved from detemrinisticmns to specialtxman (Konstantin Akimov)
ce1c7de refactor: unwrap CEvoDB from unique_ptr when calling DashChainstateSetup (Konstantin Akimov)
e869209 chore: add TODO to drop circular dependency of mnhftx and validation.h (Konstantin Akimov)
9709588 refactor: move CCreditPool inside chain-state helper (Konstantin Akimov)
0bb7f53 refactor: drop atomic from evo/mnhftx (Konstantin Akimov)
24ee98e refactor: re-connect ehf manager to fix new circular dependencies (Konstantin Akimov)
0949a34 refactor: move initialization of ehf manager from init.cpp to chainhelper (Konstantin Akimov)
525c3dc refactor: drop left-over CActiveMasternodeManager from chain state and LLMQContext (Konstantin Akimov)
Pull request description:
## Issue being fixed or feature implemented
LoadChainState is aware of EHF Manager and Credit Pool Manager that are constructed outside, but have no meaning without Chain State; and its ownership and life time is controlled by Chain State too.
## What was done?
- EHF Manager (`CMNHFManager`), Credit Pool Manager (`CCreditPoolManager`
- Removed `CMNHFManager::ConnectManagers`
- validation of protx transaction is moved from evo/deterministicmns.h to evo/specialtxman.h to break new circular dependencies
- removed atomic from `m_qman` in `CMNHFManager`
TODO: this PR includes some extra refactorings with code move from deterministicmns.h, that's a preparation for move `dmnman` (`CDeterministicMNManager`) inside Chain State too. Though, there's too many usages of `NodeContext::dmnman` all over code base, and many of its usages are not aware about Chain State at the moment; it will requires significant refactoring all over code base and out-of-scope of this PR; will be done in the further PRs with some extra efforts. Also, LLMQContext depends on dmnman; chainhelper depends on llmq-context; dmnman can't be easily moved inside chainhelper without moving llmq-ctx inside, which is out-of-scope of this PR.
$ grep -r node.dmnman src/ -I | wc -l
80
## How Has This Been Tested?
Run unit and functional tests, run lint-circular-dependencies.py
## Breaking Changes
N/A
## Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone
ACKs for top commit:
UdjinM6:
utACK 7da6d06
kwvg:
utACK 7da6d06
Tree-SHA512: f54596840a88df6b4a3d31d9c44ce9b6d44bf67f64e1f2392cec0139f1d955d189ac7180a5067a86263526ec2138faedc99c2e73c292724dfa7d94a61a467f2bFile tree
24 files changed
+590
-651
lines changed- src
- active
- evo
- llmq
- node
- rpc
- test
- util
- test/lint
24 files changed
+590
-651
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
| 25 | + | |
| 26 | + | |
23 | 27 | | |
24 | | - | |
25 | | - | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| |||
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
| |||
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| |||
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
| 68 | + | |
| 69 | + | |
65 | 70 | | |
| 71 | + | |
| 72 | + | |
66 | 73 | | |
67 | 74 | | |
68 | 75 | | |
| |||
0 commit comments