MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / GetNetBoolArg

Method GetNetBoolArg

src/util.cpp:306–317  ·  view source on GitHub ↗

Special test for -testnet and -regtest args, because we * don't want to be confused by craziness like "[regtest] testnet=1" */

Source from the content-addressed store, hash-verified

304 * don't want to be confused by craziness like "[regtest] testnet=1"
305 */
306 static inline bool GetNetBoolArg(const ArgsManager &am, const std::string& net_arg)
307 {
308 std::pair<bool,std::string> found_result(false,std::string());
309 found_result = GetArgHelper(am.m_override_args, net_arg, true);
310 if (!found_result.first) {
311 found_result = GetArgHelper(am.m_config_args, net_arg, true);
312 if (!found_result.first) {
313 return false; // not set
314 }
315 }
316 return InterpretBool(found_result.second); // is set, so evaluate
317 }
318};
319
320/**

Callers

nothing calls this directly

Calls 1

InterpretBoolFunction · 0.85

Tested by

no test coverage detected