aboutsummaryrefslogtreecommitdiff
path: root/src/chainparams.h
diff options
context:
space:
mode:
authorJorge Timón <jtimon@jtimon.cc>2015-06-30 21:39:49 +0200
committerJorge Timón <jtimon@jtimon.cc>2015-10-20 14:22:44 +0200
commitf3525e24e3a156eaa004ca28a59fe2d449dc1f9e (patch)
tree6fceee33ff5c9efff9e97ea0045f4726239714b0 /src/chainparams.h
parent49793fbb097e9f00149a054adeddad07f0444c12 (diff)
Chainparams: Replace CBaseChainParams::Network enum with string constants (suggested by Wladimir)
Diffstat (limited to 'src/chainparams.h')
-rw-r--r--src/chainparams.h13
1 files changed, 9 insertions, 4 deletions
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.