Cleanup another global variable. Depends on D1519.
Details
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- globals2
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 2773 Build 3656: Bitcoin ABC Buildbot (legacy) Build 3655: arc lint + arc unit
Event Timeline
Having global.h is a feature. e have a bunch of globals. If you can make them accessible through the GlobalConfig, and put them in global.h , then you find yourself is a situation where the globals cannot be used directly, which allows you to do what you just did in that diff. Nothing is gained by removing it.
In addition, it's kind of dangerous to remove the globals this way, as you experienced in D1519 , as the config can become inconsistent from one instance to the other - and code relying on GetConfig will just get it plain wrong. Moving globals in global.h/cpp and getting rid of GetConfig calls is a much safer path forward, as, once we have no calls to GetConfig anymore, we have a guarantee that all globals are accessed through the GlobalConfig and never directly and can there fore be unglobalized as no code can notice anymore.
Finally, the global you removed is literally used nowhere, so all the migration code is useless and should be deleted instead.