HomePhabricator

[backport#15335] Fix lack of warning of unrecognized section names

Description

[backport#15335] Fix lack of warning of unrecognized section names

Summary:
1a7ba84e11 Fix lack of warning of unrecognized section names (Akio Nakamura)

Pull request description:

In #14708, It was introduced that to warn when unrecognized section names are exist in the config file.
But ```m_config_sections.clear()```  in ```ArgsManager::ReadConfigStream()``` is called every time when reading each configuration file, so it can warn about only last reading file if ```includeconf``` exists.

This PR fix lack of warning by collecting all section names by moving ```m_config_sections.clear()```  to ```ArgsManager::ReadConfigFiles()``` .
Also add a test code to confirm this situation.

Tree-SHA512: 26aa0cbe3e4ae2e58cbe73d4492ee5cf465fd4c3e5df2c8ca7e282b627df9e637267af1e3816386b1dc6db2398b31936925ce0e432219fec3a9b3398f01e3e65


Depends on D5757

This is a backport of Core PR15335

Test Plan:

ninja check
test_runner.py feature_config_args.py

Reviewers: deadalnix, #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Mar 2 2019, 14:59
majcostaCommitted on Apr 17 2020, 13:48
majcostaPushed on Apr 17 2020, 14:12
Reviewer
Restricted Project
Differential Revision
D5758: [backport#15335] Fix lack of warning of unrecognized section names
Parents
rSTAGINGcd52fd65a466: [backport#15087] Error if rpcpassword contains hash in conf sections
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/18908, tag: phabricator/base/18904