chainparams: Add BIP 44 coin type (as registered in SLIP 44)

This commit is contained in:
Jack Grigg 2018-08-01 15:01:16 +01:00
parent 4922d1c19a
commit 0ecdd0f30a
No known key found for this signature in database
GPG Key ID: 1B8D649257DB0829
2 changed files with 5 additions and 0 deletions

View File

@ -82,6 +82,7 @@ public:
CMainParams() {
strNetworkID = "main";
strCurrencyUnits = "ZEC";
bip44CoinType = 133; // As registered in https://github.com/satoshilabs/slips/blob/master/slip-0044.md
consensus.fCoinbaseMustBeProtected = true;
consensus.nSubsidySlowStartInterval = 20000;
consensus.nSubsidyHalvingInterval = 840000;
@ -258,6 +259,7 @@ public:
CTestNetParams() {
strNetworkID = "test";
strCurrencyUnits = "TAZ";
bip44CoinType = 1;
consensus.fCoinbaseMustBeProtected = true;
consensus.nSubsidySlowStartInterval = 20000;
consensus.nSubsidyHalvingInterval = 840000;
@ -377,6 +379,7 @@ public:
CRegTestParams() {
strNetworkID = "regtest";
strCurrencyUnits = "REG";
bip44CoinType = 1;
consensus.fCoinbaseMustBeProtected = false;
consensus.nSubsidySlowStartInterval = 0;
consensus.nSubsidyHalvingInterval = 150;

View File

@ -81,6 +81,7 @@ public:
unsigned int EquihashN() const { return nEquihashN; }
unsigned int EquihashK() const { return nEquihashK; }
std::string CurrencyUnits() const { return strCurrencyUnits; }
uint32_t BIP44CoinType() const { return bip44CoinType; }
/** Make miner stop after a block is found. In RPC, don't return until nGenProcLimit blocks are generated */
bool MineBlocksOnDemand() const { return fMineBlocksOnDemand; }
/** In the future use NetworkIDString() for RPC fields */
@ -114,6 +115,7 @@ protected:
std::string bech32HRPs[MAX_BECH32_TYPES];
std::string strNetworkID;
std::string strCurrencyUnits;
uint32_t bip44CoinType;
CBlock genesis;
std::vector<SeedSpec6> vFixedSeeds;
bool fMiningRequiresPeers = false;