HomePhabricator

[backport#14708] Warn unrecognised sections in the config file

Description

[backport#14708] Warn unrecognised sections in the config file

Summary:
3fb09b9889665a24b34f25e9d1385a05058a28b7 Warn unrecognized sections in the config file (Akio Nakamura)

Pull request description:

This PR intends to resolve #14702.

In the config file, sections are specified by square bracket pair "[]"$,
or included in the option name itself which separated by a period"(.)".

Typicaly, [testnet] is not a correct section name and specified options
in that section are ignored but user cannot recognize what is happen.

So, add some log-warning messages if unrecognized section names are
present in the config file after checking section only args.

note: Currentry, followings are out of scope of this PR.
1) Empty section name or option name can describe.
e.g. [] , .a=b, =c
2) Multiple period characters can exist in the section name and option name.
e.g. [c.d.e], [..], f.g.h.i=j, ..=k

Tree-SHA512: 2cea02a0525feb40320613989a75cd7b7b1bd12158d5e6f3174ca77e6a25bb84425dd8812f62483df9fc482045c7b5402d69bc714430518b1847d055a2dc304b


This is a backport of Core PR14708

Test Plan:

ninja
test_runner.py feature_config_args.py

Reviewers: deadalnix, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: deadalnix, O1 Bitcoin ABC, #bitcoin_abc

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

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Nov 21 2018, 15:43
majcostaCommitted on Apr 17 2020, 13:26
majcostaPushed on Apr 17 2020, 14:12
Reviewer
Restricted Owners Package
Differential Revision
D5756: [backport#14708] Warn unrecognised sections in the config file
Parents
rSTAGINGa7ca467d91a4: Backport Core PR12246
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/18906