diff options
| author | Anthony Towns <[email protected]> | 2018-03-29 15:00:00 +1000 |
|---|---|---|
| committer | Anthony Towns <[email protected]> | 2018-04-06 04:46:02 +1000 |
| commit | 11b6b5b86e7dab05be38d614891dd6e6031d04a4 (patch) | |
| tree | 3401eabbf1991c95c811a03984f8015429e39b0b /src/util.h | |
| parent | Merge #10244: Refactor: separate gui from wallet and node (diff) | |
| download | discoin-11b6b5b86e7dab05be38d614891dd6e6031d04a4.tar.xz discoin-11b6b5b86e7dab05be38d614891dd6e6031d04a4.zip | |
Move ChainNameFromCommandLine into ArgsManager and rename to GetChainName
Diffstat (limited to 'src/util.h')
| -rw-r--r-- | src/util.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h index 7114c0acc..5afe80cb0 100644 --- a/src/util.h +++ b/src/util.h @@ -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. |