MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / TestChain100Setup

Method TestChain100Setup

src/test/test_bitcoin.cpp:127–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127TestChain100Setup::TestChain100Setup() : TestingSetup(CBaseChainParams::REGTEST)
128{
129 // CreateAndProcessBlock() does not support building SegWit blocks, so don't activate in these tests.
130 // TODO: fix the code to support SegWit blocks.
131 UpdateVersionBitsParameters(Consensus::DEPLOYMENT_SEGWIT, 0, Consensus::BIP9Deployment::NO_TIMEOUT);
132 // Generate a 100-block chain:
133 coinbaseKey.MakeNewKey(true);
134 CScript scriptPubKey = CScript() << ToByteVector(coinbaseKey.GetPubKey()) << OP_CHECKSIG;
135 for (int i = 0; i < COINBASE_MATURITY; i++)
136 {
137 std::vector<CMutableTransaction> noTxns;
138 CBlock b = CreateAndProcessBlock(noTxns, scriptPubKey);
139 m_coinbase_txns.push_back(b.vtx[0]);
140 }
141}
142
143//
144// Create a new block with just given transactions, coinbase paying to

Callers

nothing calls this directly

Calls 6

ToByteVectorFunction · 0.85
MakeNewKeyMethod · 0.80
CScriptClass · 0.70
GetPubKeyMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected