This removes usage of g_chainman and ::ActiveChainstate() in the Avalanche processor.
Details
Details
- Reviewers
Fabien - Group Reviewers
Restricted Project - Commits
- rABCcba2d5ffc3cb: [avalanche] Pass chainman to Processor
ninja all check-all
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
src/avalanche/processor.h | ||
---|---|---|
98 ↗ | (On Diff #34232) | Is it safe ? Did you check that the ChainstateManager cannot be destructed before the Processor ? |
src/avalanche/processor.h | ||
---|---|---|
98 ↗ | (On Diff #34232) | If it does, then the problem is clearly not with this patch, but indeed, checking is necessary. |
src/avalanche/processor.h | ||
---|---|---|
98 ↗ | (On Diff #34232) | So I checked that the ChainStateManager is always destroyed last in init.cpp and in the test fixture. But do you guys mean to say that this member should be somehow made foolproof by using some kind of exotic pointer rather than a reference? |
src/avalanche/processor.h | ||
---|---|---|
98 ↗ | (On Diff #34232) | Maybe pass a NodeContext to wrap the chainstate in a pointer? |