Commit ecd5c90
refactor: defer active_ctx block tip init until after nodeman->Init()
Move InitializeCurrentBlockTip for active_ctx (masternode mode) to
after nodeman->Init() so that GetProTxHash() is guaranteed to be set
before EnsureQuorumConnections runs.
Currently this works by accident: UpdatedBlockTip calls Init()
internally when the MN state is not READY. But this is a non-obvious
side effect and would silently break quorum connections if someone
refactored UpdatedBlockTip to add an early return. Also, if
IsInitialBlockDownload() is true, UpdatedBlockTip returns early and
Init() never runs, leaving a null proTxHash for quorum setup.
Making the dependency explicit improves robustness without changing
observable behavior in normal operation.
Also add a MN-to-MN quorum connection assertion in the restart test
to verify that quorum connections form between masternodes after
restart, not just that IS locks work (which can succeed via
concentrated sigshare sending over any authenticated connection).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent c25c61a commit ecd5c90
2 files changed
Lines changed: 30 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2420 | 2420 | | |
2421 | 2421 | | |
2422 | 2422 | | |
2423 | | - | |
2424 | | - | |
2425 | | - | |
| 2423 | + | |
2426 | 2424 | | |
2427 | 2425 | | |
| 2426 | + | |
| 2427 | + | |
2428 | 2428 | | |
2429 | 2429 | | |
2430 | 2430 | | |
| |||
2490 | 2490 | | |
2491 | 2491 | | |
2492 | 2492 | | |
| 2493 | + | |
| 2494 | + | |
| 2495 | + | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
2493 | 2500 | | |
2494 | 2501 | | |
2495 | 2502 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
178 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
179 | 181 | | |
180 | 182 | | |
181 | 183 | | |
| |||
188 | 190 | | |
189 | 191 | | |
190 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
191 | 209 | | |
192 | 210 | | |
193 | 211 | | |
| |||
0 commit comments