aboutsummaryrefslogtreecommitdiff
path: root/src/chainparamsbase.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2014-09-19 19:21:46 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2014-09-19 19:21:46 +0200
commit20e01b1a03819d843a860284033b48a5e3b65ff7 (patch)
tree5b390722b053ce5b448919bda2695d173980ffb5 /src/chainparamsbase.cpp
parent2fc6c67400e91846ca1c1c57011e57491013f9bd (diff)
Apply clang-format on some infrequently-updated files
Diffstat (limited to 'src/chainparamsbase.cpp')
-rw-r--r--src/chainparamsbase.cpp56
1 files changed, 33 insertions, 23 deletions
diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp
index d1e19871c3..98bb5b855f 100644
--- a/src/chainparamsbase.cpp
+++ b/src/chainparamsbase.cpp
@@ -17,9 +17,11 @@ using namespace boost::assign;
// Main network
//
-class CBaseMainParams : public CBaseChainParams {
+class CBaseMainParams : public CBaseChainParams
+{
public:
- CBaseMainParams() {
+ CBaseMainParams()
+ {
networkID = CBaseChainParams::MAIN;
nRPCPort = 8332;
}
@@ -29,9 +31,11 @@ static CBaseMainParams mainParams;
//
// Testnet (v3)
//
-class CBaseTestNetParams : public CBaseMainParams {
+class CBaseTestNetParams : public CBaseMainParams
+{
public:
- CBaseTestNetParams() {
+ CBaseTestNetParams()
+ {
networkID = CBaseChainParams::TESTNET;
nRPCPort = 18332;
strDataDir = "testnet3";
@@ -42,40 +46,45 @@ static CBaseTestNetParams testNetParams;
//
// Regression test
//
-class CBaseRegTestParams : public CBaseTestNetParams {
+class CBaseRegTestParams : public CBaseTestNetParams
+{
public:
- CBaseRegTestParams() {
+ CBaseRegTestParams()
+ {
networkID = CBaseChainParams::REGTEST;
strDataDir = "regtest";
}
};
static CBaseRegTestParams regTestParams;
-static CBaseChainParams *pCurrentBaseParams = 0;
+static CBaseChainParams* pCurrentBaseParams = 0;
-const CBaseChainParams &BaseParams() {
+const CBaseChainParams& BaseParams()
+{
assert(pCurrentBaseParams);
return *pCurrentBaseParams;
}
-void SelectBaseParams(CBaseChainParams::Network network) {
+void SelectBaseParams(CBaseChainParams::Network network)
+{
switch (network) {
- case CBaseChainParams::MAIN:
- pCurrentBaseParams = &mainParams;
- break;
- case CBaseChainParams::TESTNET:
- pCurrentBaseParams = &testNetParams;
- break;
- case CBaseChainParams::REGTEST:
- pCurrentBaseParams = &regTestParams;
- break;
- default:
- assert(false && "Unimplemented network");
- return;
+ case CBaseChainParams::MAIN:
+ pCurrentBaseParams = &mainParams;
+ break;
+ case CBaseChainParams::TESTNET:
+ pCurrentBaseParams = &testNetParams;
+ break;
+ case CBaseChainParams::REGTEST:
+ pCurrentBaseParams = &regTestParams;
+ break;
+ default:
+ assert(false && "Unimplemented network");
+ return;
}
}
-bool SelectBaseParamsFromCommandLine() {
+bool SelectBaseParamsFromCommandLine()
+{
bool fRegTest = GetBoolArg("-regtest", false);
bool fTestNet = GetBoolArg("-testnet", false);
@@ -93,6 +102,7 @@ bool SelectBaseParamsFromCommandLine() {
return true;
}
-bool AreBaseParamsConfigured() {
+bool AreBaseParamsConfigured()
+{
return pCurrentBaseParams != NULL;
}