HomePhabricator

[refactor] Config handling refactoring in preparation for network-specific…

Description

[refactor] Config handling refactoring in preparation for network-specific sections

Summary:

  • Move ChainNameFromCommandLine into ArgsManager and rename to GetChainName
  • [tests] Add unit tests for GetChainName
  • Separate out ReadConfigStream from ReadConfigFile
  • ReadConfigStream: assume the stream is good
  • [tests] Add unit tests for ReadConfigStream
  • [tests] Check GetChainName works with config entries
  • [tests] Add additional unit tests for -nofoo edge cases

This is a backport of Core's PR12878

Depends on D1833

Test Plan:

make check

Reviewers: #bitcoin_abc, jasonbcox, schancel

Reviewed By: #bitcoin_abc, jasonbcox, schancel

Subscribers: schancel, jasonbcox, teamcity

Differential Revision: https://reviews.bitcoinabc.org/D1834

Details

Provenance
Anthony Towns <aj@erisian.com.au>Authored on Mar 29 2018, 05:00
deadalnixCommitted on Oct 9 2018, 00:33
deadalnixPushed on Oct 9 2018, 00:50
Reviewer
Restricted Project
Differential Revision
D1834: [refactor] Config handling refactoring in preparation for network-specific sections
Parents
rSTAGINGb575d39dc724: SHA256 implementations based on Intel SHA Extensions
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/5325