diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2014-09-19 19:21:46 +0200 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2014-09-19 19:21:46 +0200 |
commit | 20e01b1a03819d843a860284033b48a5e3b65ff7 (patch) | |
tree | 5b390722b053ce5b448919bda2695d173980ffb5 /src/chainparamsbase.cpp | |
parent | 2fc6c67400e91846ca1c1c57011e57491013f9bd (diff) |
Apply clang-format on some infrequently-updated files
Diffstat (limited to 'src/chainparamsbase.cpp')
-rw-r--r-- | src/chainparamsbase.cpp | 56 |
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 = ®TestParams; - break; - default: - assert(false && "Unimplemented network"); - return; + case CBaseChainParams::MAIN: + pCurrentBaseParams = &mainParams; + break; + case CBaseChainParams::TESTNET: + pCurrentBaseParams = &testNetParams; + break; + case CBaseChainParams::REGTEST: + pCurrentBaseParams = ®TestParams; + 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; } |