@@ -24,44 +24,6 @@ void AppendParamsHelpMessages(std::string& strUsage, bool debugHelp)
24
24
strUsage += HelpMessageOpt (" -testnet" , _ (" Use the test chain" ));
25
25
}
26
26
27
- /* *
28
- * Main network
29
- */
30
- class CBaseMainParams : public CBaseChainParams
31
- {
32
- public:
33
- CBaseMainParams ()
34
- {
35
- nRPCPort = 8332 ;
36
- }
37
- };
38
-
39
- /* *
40
- * Testnet (v3)
41
- */
42
- class CBaseTestNetParams : public CBaseChainParams
43
- {
44
- public:
45
- CBaseTestNetParams ()
46
- {
47
- nRPCPort = 18332 ;
48
- strDataDir = " testnet3" ;
49
- }
50
- };
51
-
52
- /*
53
- * Regression test
54
- */
55
- class CBaseRegTestParams : public CBaseChainParams
56
- {
57
- public:
58
- CBaseRegTestParams ()
59
- {
60
- nRPCPort = 18443 ;
61
- strDataDir = " regtest" ;
62
- }
63
- };
64
-
65
27
static std::unique_ptr<CBaseChainParams> globalChainBaseParams;
66
28
67
29
const CBaseChainParams& BaseParams ()
@@ -73,11 +35,11 @@ const CBaseChainParams& BaseParams()
73
35
std::unique_ptr<CBaseChainParams> CreateBaseChainParams (const std::string& chain)
74
36
{
75
37
if (chain == CBaseChainParams::MAIN)
76
- return std::unique_ptr <CBaseChainParams>(new CBaseMainParams () );
38
+ return MakeUnique <CBaseChainParams>(" " , 8332 );
77
39
else if (chain == CBaseChainParams::TESTNET)
78
- return std::unique_ptr <CBaseChainParams>(new CBaseTestNetParams () );
40
+ return MakeUnique <CBaseChainParams>(" testnet3 " , 18332 );
79
41
else if (chain == CBaseChainParams::REGTEST)
80
- return std::unique_ptr <CBaseChainParams>(new CBaseRegTestParams () );
42
+ return MakeUnique <CBaseChainParams>(" regtest " , 18443 );
81
43
else
82
44
throw std::runtime_error (strprintf (" %s: Unknown chain %s." , __func__, chain));
83
45
}
0 commit comments