Page MenuHomePhabricator

validation: access chainparams via chainstatemanager
ClosedPublic

Authored by PiRK on Dec 22 2023, 13:28.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCabe90d2043c4: validation: access chainparams via chainstatemanager
Summary

validation: replace ::Params() calls with chainstate/chainman member

refactor: Replace Chainstate::m_params with chainman.GetParams()

kernel: pass params to BlockManager rather than using a global

After these 3 commits, there is no more validation code using the global getter for the global CChainParams.

The chainparams are now accessed either:

  • via a Config passed as a function argument
  • via ChainstateManager::GetParams (uses ChainstateManager::m_config::GetChainParams())
  • a chainparams function argument

This is a backport of core#25264, core#25830, core#24595

Test Plan

ninja all check-all