MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / GetUnsuitableSectionOnlyArgs

Method GetUnsuitableSectionOnlyArgs

src/common/args.cpp:134–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132ArgsManager::~ArgsManager() = default;
133
134std::set<std::string> ArgsManager::GetUnsuitableSectionOnlyArgs() const
135{
136 std::set<std::string> unsuitables;
137
138 LOCK(cs_args);
139
140 // if there's no section selected, don't worry
141 if (m_network.empty()) return std::set<std::string> {};
142
143 // if it's okay to use the default section for this network, don't worry
144 if (m_network == ChainTypeToString(ChainType::MAIN)) return std::set<std::string> {};
145
146 for (const auto& arg : m_network_only_args) {
147 if (OnlyHasDefaultSectionSetting(m_settings, m_network, SettingName(arg))) {
148 unsuitables.insert(arg);
149 }
150 }
151 return unsuitables;
152}
153
154std::list<SectionInfo> ArgsManager::GetUnrecognizedSections() const
155{

Callers 3

BOOST_FIXTURE_TEST_CASEFunction · 0.80
system.cppFile · 0.80

Calls 5

ChainTypeToStringFunction · 0.85
SettingNameFunction · 0.70
emptyMethod · 0.45
insertMethod · 0.45

Tested by 1

BOOST_FIXTURE_TEST_CASEFunction · 0.64