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

Method mineBlocks

src/test/util/setup_common.cpp:433–442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

431}
432
433void TestChain100Setup::mineBlocks(int num_blocks)
434{
435 CScript scriptPubKey = CScript() << ToByteVector(coinbaseKey.GetPubKey()) << OP_CHECKSIG;
436 for (int i = 0; i < num_blocks; i++) {
437 std::vector<CMutableTransaction> noTxns;
438 CBlock b = CreateAndProcessBlock(noTxns, scriptPubKey);
439 m_clock += 1s;
440 m_coinbase_txns.push_back(b.vtx[0]);
441 }
442}
443
444CBlock TestChain100Setup::CreateBlock(
445 const std::vector<CMutableTransaction>& txns,

Callers 2

TestChain100SetupMethod · 0.95
CheckBlockIndexFunction · 0.80

Calls 4

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

Tested by

no test coverage detected