Changeset View
Changeset View
Standalone View
Standalone View
src/chainparams.cpp
Show First 20 Lines • Show All 194 Lines • ▼ Show 20 Lines | CMainParams() { | ||||
// BCHD | // BCHD | ||||
vSeeds.emplace_back("seed.bchd.cash"); | vSeeds.emplace_back("seed.bchd.cash"); | ||||
base58Prefixes[PUBKEY_ADDRESS] = std::vector<uint8_t>(1, 0); | base58Prefixes[PUBKEY_ADDRESS] = std::vector<uint8_t>(1, 0); | ||||
base58Prefixes[SCRIPT_ADDRESS] = std::vector<uint8_t>(1, 5); | base58Prefixes[SCRIPT_ADDRESS] = std::vector<uint8_t>(1, 5); | ||||
base58Prefixes[SECRET_KEY] = std::vector<uint8_t>(1, 128); | base58Prefixes[SECRET_KEY] = std::vector<uint8_t>(1, 128); | ||||
base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x88, 0xB2, 0x1E}; | base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x88, 0xB2, 0x1E}; | ||||
base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x88, 0xAD, 0xE4}; | base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x88, 0xAD, 0xE4}; | ||||
cashaddrPrefix = "bitcoincash"; | cashaddrPrefix = CASHADDR_PREFIX; | ||||
backwardsCompatibleCashaddrPrefix = | |||||
BACKWARDS_COMPATIBLE_CASHADDR_PREFIX; | |||||
vFixedSeeds = std::vector<SeedSpec6>( | vFixedSeeds = std::vector<SeedSpec6>( | ||||
pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main)); | pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main)); | ||||
fDefaultConsistencyChecks = false; | fDefaultConsistencyChecks = false; | ||||
fRequireStandard = true; | fRequireStandard = true; | ||||
m_is_test_chain = false; | m_is_test_chain = false; | ||||
m_is_mockable_chain = false; | m_is_mockable_chain = false; | ||||
▲ Show 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | CTestNetParams() { | ||||
// BCHD | // BCHD | ||||
vSeeds.emplace_back("testnet-seed.bchd.cash"); | vSeeds.emplace_back("testnet-seed.bchd.cash"); | ||||
base58Prefixes[PUBKEY_ADDRESS] = std::vector<uint8_t>(1, 111); | base58Prefixes[PUBKEY_ADDRESS] = std::vector<uint8_t>(1, 111); | ||||
base58Prefixes[SCRIPT_ADDRESS] = std::vector<uint8_t>(1, 196); | base58Prefixes[SCRIPT_ADDRESS] = std::vector<uint8_t>(1, 196); | ||||
base58Prefixes[SECRET_KEY] = std::vector<uint8_t>(1, 239); | base58Prefixes[SECRET_KEY] = std::vector<uint8_t>(1, 239); | ||||
base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x35, 0x87, 0xCF}; | base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x35, 0x87, 0xCF}; | ||||
base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x35, 0x83, 0x94}; | base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x35, 0x83, 0x94}; | ||||
cashaddrPrefix = "bchtest"; | cashaddrPrefix = CASHADDR_PREFIX_TESTNET; | ||||
backwardsCompatibleCashaddrPrefix = | |||||
BACKWARDS_COMPATIBLE_CASHADDR_PREFIX_TESTNET; | |||||
vFixedSeeds = std::vector<SeedSpec6>( | vFixedSeeds = std::vector<SeedSpec6>( | ||||
pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test)); | pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test)); | ||||
fDefaultConsistencyChecks = false; | fDefaultConsistencyChecks = false; | ||||
fRequireStandard = false; | fRequireStandard = false; | ||||
m_is_test_chain = true; | m_is_test_chain = true; | ||||
m_is_mockable_chain = false; | m_is_mockable_chain = false; | ||||
▲ Show 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | CRegTestParams() { | ||||
chainTxData = ChainTxData{0, 0, 0}; | chainTxData = ChainTxData{0, 0, 0}; | ||||
base58Prefixes[PUBKEY_ADDRESS] = std::vector<uint8_t>(1, 111); | base58Prefixes[PUBKEY_ADDRESS] = std::vector<uint8_t>(1, 111); | ||||
base58Prefixes[SCRIPT_ADDRESS] = std::vector<uint8_t>(1, 196); | base58Prefixes[SCRIPT_ADDRESS] = std::vector<uint8_t>(1, 196); | ||||
base58Prefixes[SECRET_KEY] = std::vector<uint8_t>(1, 239); | base58Prefixes[SECRET_KEY] = std::vector<uint8_t>(1, 239); | ||||
base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x35, 0x87, 0xCF}; | base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x35, 0x87, 0xCF}; | ||||
base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x35, 0x83, 0x94}; | base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x35, 0x83, 0x94}; | ||||
cashaddrPrefix = "bchreg"; | cashaddrPrefix = CASHADDR_PREFIX_REGTEST; | ||||
backwardsCompatibleCashaddrPrefix = | |||||
BACKWARDS_COMPATIBLE_CASHADDR_PREFIX_REGTEST; | |||||
} | } | ||||
}; | }; | ||||
static std::unique_ptr<CChainParams> globalChainParams; | static std::unique_ptr<CChainParams> globalChainParams; | ||||
const CChainParams &Params() { | const CChainParams &Params() { | ||||
assert(globalChainParams); | assert(globalChainParams); | ||||
return *globalChainParams; | return *globalChainParams; | ||||
Show All 23 Lines |