The ChainstateManager has access to the config, so no need to pass it to ChronikBridge when it has already a NodeContext. This removes one GetConfig() call and is a step towards unglobalizing the Config.
Details
Details
- Reviewers
Fabien - Group Reviewers
Restricted Project - Commits
- rABCfdaa22f51a9b: [chronik] get consensus params via chainman
cmake .. -GNinja -DBUILD_BITCOIN_CHRONIK=ON ninja all check-all
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- getconfig
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Event Timeline
chronik/chronik-cpp/chronik_bridge.cpp | ||
---|---|---|
199 | We should have an assert that the pointer is not null. It's not done anywhere else so maybe there is one at an upper level ? |
chronik/chronik-cpp/chronik_bridge.cpp | ||
---|---|---|
199 | I will check if there is one. The rest of the chronik code seems to assume that chainman is not nullptr. |
Comment Actions
add an Assert(node.chainman) to ensure the chainman is not nullptr, as the ChronikBridge code heavily depends on that.
Note that in the current state of the codebase this is already done in init.cpp before calling chronik::Start(config, node, fReindexChronik), but it doesn't hurt to check again for all case where ChronikBridge is instantiated directly (unit tests)