Replace direct calls of Params() with Config.GetChainParams() Refs T170
Details
Details
- Reviewers
jasonbcox deadalnix - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) Restricted Project - Maniphest Tasks
- T170: Replace direct calls of Params() with Config.GetChainParams()
- Commits
- rSTAGING5242be937fdb: [Part1] Removed Params() from addrdb
rABC5242be937fdb: [Part1] Removed Params() from addrdb
make check
./test/functional/test_runner.py --extended
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- T170-Params
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 1810 Build 1813: Bitcoin ABC Buildbot (legacy) Build 1812: arc lint + arc unit
Event Timeline
Comment Actions
Here is the first chunk of T170 – I replaced usages of Params() in addrdb.cpp and fixed all refrences.
Works that remains:
- Fix the remaining code, that already holds the reference to Config (destnode.cpp, netprocessing.cpp, blochckain.cpp,…) Config.GetChainParams() can be used in this case.
Usages that are harder to fix:
- base58.cpp uses Params().Base58Prefix. Constructors for bunch of classes (CBitcoinSecret, CBitcoinExtKey, CBitcoinExtPubKey) would need to be changed if we want to inject the configuration. Probably not worth it?
- QT related code (bitcoin_gui.cpp has reference, but does not pass it to child QT object)
- the are some global functions that use Params() we could pass the conifg all the way down the call stacks
- should we fix CPP tests too?
Comment Actions
Looks good to me, but make sure @deadalnix signs off too. I'm not sure if he's reviewed the ticket in the first place.