diff options
Diffstat (limited to 'src/chainparams.h')
-rw-r--r-- | src/chainparams.h | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/chainparams.h b/src/chainparams.h index e9774bbfa2..446256ba82 100644 --- a/src/chainparams.h +++ b/src/chainparams.h @@ -7,6 +7,7 @@ #define BITCOIN_CHAIN_PARAMS_H #include "core.h" +#include "chainparamsbase.h" #include "protocol.h" #include "uint256.h" @@ -29,14 +30,6 @@ struct CDNSSeedData { class CChainParams { public: - enum Network { - MAIN, - TESTNET, - REGTEST, - - MAX_NETWORK_TYPES - }; - enum Base58Type { PUBKEY_ADDRESS, SCRIPT_ADDRESS, @@ -73,17 +66,15 @@ public: int64_t TargetTimespan() const { return nTargetTimespan; } int64_t TargetSpacing() const { return nTargetSpacing; } int64_t Interval() const { return nTargetTimespan / nTargetSpacing; } - const std::string& DataDir() const { return strDataDir; } /* Make miner stop after a block is found. In RPC, don't return * until nGenProcLimit blocks are generated */ bool MineBlocksOnDemand() const { return fMineBlocksOnDemand; } - Network NetworkID() const { return networkID; } + CBaseChainParams::Network NetworkID() const { return networkID; } /* Return the BIP70 network string (main, test or regtest) */ std::string NetworkIDString() const { return strNetworkID; } const std::vector<CDNSSeedData>& DNSSeeds() const { return vSeeds; } const std::vector<unsigned char>& Base58Prefix(Base58Type type) const { return base58Prefixes[type]; } const std::vector<CAddress>& FixedSeeds() const { return vFixedSeeds; } - int RPCPort() const { return nRPCPort; } protected: CChainParams() {} @@ -92,7 +83,6 @@ protected: // Raw pub key bytes for the broadcast alert signing key. std::vector<unsigned char> vAlertPubKey; int nDefaultPort; - int nRPCPort; uint256 bnProofOfWorkLimit; int nSubsidyHalvingInterval; int nEnforceBlockUpgradeMajority; @@ -100,11 +90,10 @@ protected: int nToCheckBlockUpgradeMajority; int64_t nTargetTimespan; int64_t nTargetSpacing; - std::string strDataDir; int nMinerThreads; std::vector<CDNSSeedData> vSeeds; std::vector<unsigned char> base58Prefixes[MAX_BASE58_TYPES]; - Network networkID; + CBaseChainParams::Network networkID; std::string strNetworkID; CBlock genesis; std::vector<CAddress> vFixedSeeds; @@ -123,7 +112,7 @@ protected: const CChainParams &Params(); /** Sets the params returned by Params() to those for the given network. */ -void SelectParams(CChainParams::Network network); +void SelectParams(CBaseChainParams::Network network); /** * Looks for -regtest or -testnet and then calls SelectParams as appropriate. |