| 108 | class CMainParams : public CChainParams { |
| 109 | public: |
| 110 | CMainParams(const MainNetOptions& opts) { |
| 111 | m_chain_type = ChainType::MAIN; |
| 112 | consensus.signet_blocks = false; |
| 113 | consensus.signet_challenge.clear(); |
| 114 | consensus.nSubsidyHalvingInterval = 210000; |
| 115 | consensus.script_flag_exceptions.emplace( // BIP16 exception |
| 116 | uint256{"00000000000002dc756eebf4f49723ed8d30cc28a5f108eb94b1ba88ac4f9c22"}, SCRIPT_VERIFY_NONE); |
| 117 | consensus.script_flag_exceptions.emplace( // Taproot exception |
| 118 | uint256{"0000000000000000000f14c35b2d841e986ab5441de8c585d5ffe55ea1e395ad"}, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS); |
| 119 | consensus.BIP34Height = 227931; |
| 120 | consensus.BIP34Hash = uint256{"000000000000024b89b42a942fe0d9fea3bb44ab7bd1b19115dd6a759c0808b8"}; |
| 121 | consensus.BIP65Height = 388381; // 000000000000000004c2b624ed5d7756c508d90fd0da2c7c679febfa6c4735f0 |
| 122 | consensus.BIP66Height = 363725; // 00000000000000000379eaa19dce8c9b722d46ae6a57c2f1a988119488b50931 |
| 123 | consensus.CSVHeight = 419328; // 000000000000000004a1b34462cb8aeebd5799177f7a29cf28f2d1961716b5b5 |
| 124 | consensus.SegwitHeight = 481824; // 0000000000000000001c8018d9cb3b742ef25114f27563e3fc4a1902167f9893 |
| 125 | consensus.MinBIP9WarningHeight = 711648; // taproot activation height + miner confirmation window |
| 126 | consensus.powLimit = uint256{"00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff"}; |
| 127 | consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks |
| 128 | consensus.nPowTargetSpacing = 10 * 60; |
| 129 | consensus.fPowAllowMinDifficultyBlocks = false; |
| 130 | consensus.enforce_BIP94 = false; |
| 131 | consensus.fPowNoRetargeting = false; |
| 132 | consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28; |
| 133 | consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = Consensus::BIP9Deployment::NEVER_ACTIVE; |
| 134 | consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT; |
| 135 | consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].min_activation_height = 0; // No activation delay |
| 136 | consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].threshold = 1815; // 90% |
| 137 | consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].period = 2016; |
| 138 | |
| 139 | ApplyDeploymentOptions(opts.dep_opts); |
| 140 | |
| 141 | consensus.nMinimumChainWork = uint256{"0000000000000000000000000000000000000001128750f82f4c366153a3a030"}; |
| 142 | consensus.defaultAssumeValid = uint256{"00000000000000000000ccebd6d74d9194d8dcdc1d177c478e094bfad51ba5ac"}; // 938343 |
| 143 | |
| 144 | /** |
| 145 | * The message start string is designed to be unlikely to occur in normal data. |
| 146 | * The characters are rarely used upper ASCII, not valid as UTF-8, and produce |
| 147 | * a large 32-bit integer with any alignment. |
| 148 | */ |
| 149 | pchMessageStart[0] = 0xf9; |
| 150 | pchMessageStart[1] = 0xbe; |
| 151 | pchMessageStart[2] = 0xb4; |
| 152 | pchMessageStart[3] = 0xd9; |
| 153 | nDefaultPort = 8333; |
| 154 | nPruneAfterHeight = 100000; |
| 155 | m_assumed_blockchain_size = 856; |
| 156 | m_assumed_chain_state_size = 14; |
| 157 | |
| 158 | genesis = CreateGenesisBlock(1231006505, 2083236893, 0x1d00ffff, 1, 50 * COIN); |
| 159 | consensus.hashGenesisBlock = genesis.GetHash(); |
| 160 | assert(consensus.hashGenesisBlock == uint256{"000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f"}); |
| 161 | assert(genesis.hashMerkleRoot == uint256{"4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"}); |
| 162 | |
| 163 | // Note that of those which support the service bits prefix, most only support a subset of |
| 164 | // possible options. |
| 165 | // This is fine at runtime as we'll fall back to using them as an addrfetch if they don't support the |
| 166 | // service bits we want, but we should get them updated to support all service bits wanted by any |
| 167 | // release ASAP to avoid it where possible. |
nothing calls this directly
no test coverage detected