HomePhabricator

Add util::Settings struct and helper functions.

Description

Add util::Settings struct and helper functions.

Summary:
Implement merging of settings from different sources (command line and config
file) separately from parsing code in system.cpp, so it is easier to add new
sources.

Document current inconsistent merging behavior without changing it.

This commit only adds new settings code without using it. The next commit calls
the new code to replace existing code in system.cpp.

Co-authored-by: John Newbery <john@johnnewbery.com>

This is a partial backport of Core PR15934 : https://github.com/bitcoin/bitcoin/pull/15934/commits/9dcb952fe5f85529ab28e091af7534e72c21c90f

Test Plan:

make check

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

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

Details

Provenance
Russell Yanofsky <russ@yanofsky.org>Authored on Mar 5 2019, 21:07
deadalnixCommitted on Apr 29 2020, 15:27
deadalnixPushed on Apr 29 2020, 15:27
Reviewer
Restricted Project
Differential Revision
D5886: Add util::Settings struct and helper functions.
Parents
rABCe594f5b1be4e: Rename includeconf variables for clarity
Branches
Unknown
Tags
Unknown