MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetArg

Method GetArg

src/util/system.cpp:585–589  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

583}
584
585std::string ArgsManager::GetArg(const std::string& strArg, const std::string& strDefault) const
586{
587 const util::SettingsValue value = GetSetting(strArg);
588 return value.isNull() ? strDefault : value.isFalse() ? "0" : value.isTrue() ? "1" : value.isNum() ? value.getValStr() : value.get_str();
589}
590
591int64_t ArgsManager::GetIntArg(const std::string& strArg, int64_t nDefault) const
592{

Callers 15

CommandLineRawTxFunction · 0.80
InitRPCAuthenticationFunction · 0.80
auth_cbMethod · 0.80
protocolinfo_cbMethod · 0.80
TorControlThreadFunction · 0.80
AppInitRPCFunction · 0.80
CallRPCFunction · 0.80
ParseGetInfoResultFunction · 0.80
GetNewAddressFunction · 0.80
CommandLineRPCFunction · 0.80
CallMainChainRPCFunction · 0.80
GetPidFileFunction · 0.80

Calls 5

GetSettingFunction · 0.85
isFalseMethod · 0.80
isTrueMethod · 0.80
isNumMethod · 0.80
isNullMethod · 0.45

Tested by 5

CheckValueMethod · 0.64
BOOST_AUTO_TEST_CASEFunction · 0.64
BOOST_FIXTURE_TEST_CASEFunction · 0.64
BOOST_AUTO_TEST_CASEFunction · 0.64
FUZZ_TARGET_INITFunction · 0.64