MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / CTestNet4Params

Method CTestNet4Params

src/kernel/chainparams.cpp:340–439  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338class CTestNet4Params : public CChainParams {
339public:
340 CTestNet4Params(const TestNetOptions& opts) {
341 m_chain_type = ChainType::TESTNET4;
342 consensus.signet_blocks = false;
343 consensus.signet_challenge.clear();
344 consensus.nSubsidyHalvingInterval = 210000;
345 consensus.BIP34Height = 1;
346 consensus.BIP34Hash = uint256{};
347 consensus.BIP65Height = 1;
348 consensus.BIP66Height = 1;
349 consensus.CSVHeight = 1;
350 consensus.SegwitHeight = 1;
351 consensus.MinBIP9WarningHeight = 0;
352 consensus.powLimit = uint256{"00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff"};
353 consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks
354 consensus.nPowTargetSpacing = 10 * 60;
355 consensus.fPowAllowMinDifficultyBlocks = true;
356 consensus.enforce_BIP94 = true;
357 consensus.fPowNoRetargeting = false;
358
359 consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;
360 consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = Consensus::BIP9Deployment::NEVER_ACTIVE;
361 consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
362 consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].min_activation_height = 0; // No activation delay
363 consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].threshold = 1512; // 75%
364 consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].period = 2016;
365
366 ApplyDeploymentOptions(opts.dep_opts);
367
368 consensus.nMinimumChainWork = uint256{"0000000000000000000000000000000000000000000009a0fe15d0177d086304"};
369 consensus.defaultAssumeValid = uint256{"0000000002368b1e4ee27e2e85676ae6f9f9e69579b29093e9a82c170bf7cf8a"}; // 123613
370
371 pchMessageStart[0] = 0x1c;
372 pchMessageStart[1] = 0x16;
373 pchMessageStart[2] = 0x3f;
374 pchMessageStart[3] = 0x28;
375 nDefaultPort = 48333;
376 nPruneAfterHeight = 1000;
377 m_assumed_blockchain_size = 31;
378 m_assumed_chain_state_size = 2;
379
380 const char* testnet4_genesis_msg = "03/May/2024 000000000000000000001ebd58c244970b3aa9d783bb001011fbe8ea8e98e00e";
381 const CScript testnet4_genesis_script = CScript() << "000000000000000000000000000000000000000000000000000000000000000000"_hex << OP_CHECKSIG;
382 genesis = CreateGenesisBlock(testnet4_genesis_msg,
383 testnet4_genesis_script,
384 1714777860,
385 393743547,
386 0x1d00ffff,
387 1,
388 50 * COIN);
389 consensus.hashGenesisBlock = genesis.GetHash();
390 assert(consensus.hashGenesisBlock == uint256{"00000000da84f2bafbbc53dee25a72ae507ff4914b867c565be350b0da8bf043"});
391 assert(genesis.hashMerkleRoot == uint256{"7aa0a7ae1e223414cb807e40cd57e667b718e42aaf9306db9102fe28912b7b4e"});
392
393 vFixedSeeds.clear();
394 vSeeds.clear();
395 // nodes with support for servicebits filtering should be at the top
396 vSeeds.emplace_back("seed.testnet4.bitcoin.sprovoost.nl."); // Sjors Provoost
397 vSeeds.emplace_back("seed.testnet4.wiz.biz."); // Jason Maurice

Callers

nothing calls this directly

Calls 7

CreateGenesisBlockFunction · 0.85
beginFunction · 0.85
endFunction · 0.85
CScriptClass · 0.70
clearMethod · 0.45
GetHashMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected