mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Apply clang-format on some infrequently-updated files
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user