Move ChainNameFromCommandLine into ArgsManager and rename to GetChainName

This commit is contained in:
Anthony Towns
2018-03-29 15:00:00 +10:00
parent 5f0c6a7b0e
commit 11b6b5b86e
9 changed files with 27 additions and 27 deletions

View File

@@ -306,6 +306,12 @@ public:
// been set. Also called directly in testing.
void ForceSetArg(const std::string& strArg, const std::string& strValue);
/**
* Looks for -regtest, -testnet and returns the appropriate BIP70 chain name.
* @return CBaseChainParams::MAIN by default; raises runtime error if an invalid combination is given.
*/
std::string GetChainName() const;
private:
// Munge -nofoo into -foo=0 and track the value as negated.