Page MenuHomePhabricator

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

Authored by majcosta on Apr 17 2020, 03:03.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Owners added a reviewer: Restricted Owners Package.Apr 17 2020, 03:03

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

deadalnix requested changes to this revision.Apr 17 2020, 03:05
deadalnix added inline comments.
src/util/system.cpp
357 ↗(On Diff #18884)

braces

360 ↗(On Diff #18884)

dito

This revision now requires changes to proceed.Apr 17 2020, 03:05

fixed lack of braces in single line return statements

This revision is now accepted and ready to land.Apr 17 2020, 12:37