MCPcopy Create free account
hub / github.com/ElementsProject/elements / CMainParams

Method CMainParams

src/chainparams.cpp:181–320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179class CMainParams : public CChainParams {
180public:
181 CMainParams() {
182 strNetworkID = CBaseChainParams::MAIN;
183 consensus.signet_blocks = false;
184 consensus.signet_challenge.clear();
185 consensus.nSubsidyHalvingInterval = 210000;
186 consensus.BIP16Exception = uint256S("0x00000000000002dc756eebf4f49723ed8d30cc28a5f108eb94b1ba88ac4f9c22");
187 consensus.BIP34Height = 227931;
188 consensus.BIP34Hash = uint256S("0x000000000000024b89b42a942fe0d9fea3bb44ab7bd1b19115dd6a759c0808b8");
189 consensus.BIP65Height = 388381; // 000000000000000004c2b624ed5d7756c508d90fd0da2c7c679febfa6c4735f0
190 consensus.BIP66Height = 363725; // 00000000000000000379eaa19dce8c9b722d46ae6a57c2f1a988119488b50931
191 consensus.CSVHeight = 419328; // 000000000000000004a1b34462cb8aeebd5799177f7a29cf28f2d1961716b5b5
192 consensus.SegwitHeight = 481824; // 0000000000000000001c8018d9cb3b742ef25114f27563e3fc4a1902167f9893
193 consensus.MinBIP9WarningHeight = 483840; // segwit activation height + miner confirmation window
194 consensus.powLimit = uint256S("00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
195 consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks
196 consensus.nPowTargetSpacing = 10 * 60;
197 consensus.fPowAllowMinDifficultyBlocks = false;
198 consensus.fPowNoRetargeting = false;
199 consensus.nRuleChangeActivationThreshold = 1815; // 90% of 2016
200 consensus.nMinerConfirmationWindow = 2016; // nPowTargetTimespan / nPowTargetSpacing
201 consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;
202 consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = Consensus::BIP9Deployment::NEVER_ACTIVE;
203 consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
204 consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].min_activation_height = 0; // No activation delay
205 // DynaFed: never activate (but set to avoid use of uninitialized memory in tests)
206 consensus.vDeployments[Consensus::DEPLOYMENT_DYNA_FED].bit = 25;
207 consensus.vDeployments[Consensus::DEPLOYMENT_DYNA_FED].nStartTime = Consensus::BIP9Deployment::NEVER_ACTIVE;
208 consensus.vDeployments[Consensus::DEPLOYMENT_DYNA_FED].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
209 consensus.vDeployments[Consensus::DEPLOYMENT_DYNA_FED].min_activation_height = 0; // No activation delay
210
211 // Deployment of Taproot (BIPs 340-342)
212 consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].bit = 2;
213 consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nStartTime = 1619222400; // April 24th, 2021
214 consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nTimeout = 1628640000; // August 11th, 2021
215 consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].min_activation_height = 709632; // Approximately November 12th, 2021
216
217 // Simplicity
218 consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 21;
219 consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nStartTime = Consensus::BIP9Deployment::NEVER_ACTIVE;
220 consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
221 consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].min_activation_height = 0; // No activation delay
222
223 consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000002927cdceccbd5209e81e80db");
224 consensus.defaultAssumeValid = uint256S("0x000000000000000000052d314a259755ca65944e68df6b12a067ea8f1f5a7091"); // 724466
225
226 consensus.genesis_subsidy = 50*COIN;
227 consensus.connect_genesis_outputs = false;
228 consensus.subsidy_asset = CAsset();
229 anyonecanspend_aremine = false;
230 accept_unlimited_issuances = false;
231 enforce_pak = false;
232 multi_data_permitted = false;
233 accept_discount_ct = false;
234 create_discount_ct = false;
235 consensus.has_parent_chain = false;
236 g_signed_blocks = false;
237 g_con_elementsmode = false;
238 g_con_blockheightinheader = false;

Callers

nothing calls this directly

Calls 8

uint256SFunction · 0.85
CAssetClass · 0.85
CreateGenesisBlockFunction · 0.85
beginFunction · 0.85
endFunction · 0.85
emplace_backMethod · 0.80
clearMethod · 0.45
GetHashMethod · 0.45

Tested by

no test coverage detected