From f3525e24e3a156eaa004ca28a59fe2d449dc1f9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Tim=C3=B3n?= Date: Tue, 30 Jun 2015 21:39:49 +0200 Subject: Chainparams: Replace CBaseChainParams::Network enum with string constants (suggested by Wladimir) --- src/chainparams.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/chainparams.h') diff --git a/src/chainparams.h b/src/chainparams.h index 5db39aa09c..71e2ad861e 100644 --- a/src/chainparams.h +++ b/src/chainparams.h @@ -103,11 +103,16 @@ protected: */ const CChainParams &Params(); -/** Return parameters for the given network. */ -CChainParams &Params(CBaseChainParams::Network network); +/** + * @returns CChainParams for the given BIP70 chain name. + */ +CChainParams& Params(const std::string& chain); -/** Sets the params returned by Params() to those for the given network. */ -void SelectParams(CBaseChainParams::Network network); +/** + * Sets the params returned by Params() to those for the given BIP70 chain name. + * @throws std::runtime_error when the chain is not supported. + */ +void SelectParams(const std::string& chain); /** * Looks for -regtest or -testnet and then calls SelectParams as appropriate. -- cgit v1.2.3 From 55a89751faaada5598771d10401030e9e86eecbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Tim=C3=B3n?= Date: Mon, 25 May 2015 09:00:17 +0200 Subject: Chainparams: Translations: DRY: options and error strings Also remove SelectBaseParamsFromCommandLine and SelectParamsFromCommandLine --- src/chainparams.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/chainparams.h') diff --git a/src/chainparams.h b/src/chainparams.h index 71e2ad861e..fd7a840d21 100644 --- a/src/chainparams.h +++ b/src/chainparams.h @@ -114,10 +114,4 @@ CChainParams& Params(const std::string& chain); */ void SelectParams(const std::string& chain); -/** - * Looks for -regtest or -testnet and then calls SelectParams as appropriate. - * Returns false if an invalid combination is given. - */ -bool SelectParamsFromCommandLine(); - #endif // BITCOIN_CHAINPARAMS_H -- cgit v1.2.3