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

Method mineBlocks

src/test/util/setup_common.cpp:284–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282}
283
284void TestChain100Setup::mineBlocks(int num_blocks)
285{
286 CScript scriptPubKey = CScript() << ToByteVector(coinbaseKey.GetPubKey()) << OP_CHECKSIG;
287 for (int i = 0; i < num_blocks; i++) {
288 std::vector<CMutableTransaction> noTxns;
289 CBlock b = CreateAndProcessBlock(noTxns, scriptPubKey);
290 SetMockTime(GetTime() + 1);
291 m_coinbase_txns.push_back(b.vtx[0]);
292 }
293}
294
295CBlock TestChain100Setup::CreateBlock(
296 const std::vector<CMutableTransaction>& txns,

Callers 1

TestChain100SetupMethod · 0.95

Calls 6

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

Tested by

no test coverage detected