Changeset View
Changeset View
Standalone View
Standalone View
src/test/miner_tests.cpp
Show First 20 Lines • Show All 720 Lines • ▼ Show 20 Lines | for (const auto &bi : blockinfo) { | ||||
if (txFirst.size() < 4) { | if (txFirst.size() < 4) { | ||||
txFirst.push_back(pblock->vtx[0]); | txFirst.push_back(pblock->vtx[0]); | ||||
} | } | ||||
pblock->hashMerkleRoot = BlockMerkleRoot(*pblock); | pblock->hashMerkleRoot = BlockMerkleRoot(*pblock); | ||||
pblock->nNonce = bi.nonce; | pblock->nNonce = bi.nonce; | ||||
} | } | ||||
std::shared_ptr<const CBlock> shared_pblock = | std::shared_ptr<const CBlock> shared_pblock = | ||||
std::make_shared<const CBlock>(*pblock); | std::make_shared<const CBlock>(*pblock); | ||||
BOOST_CHECK( | BOOST_CHECK(Assert(m_node.chainman) | ||||
Assert(m_node.chainman) | ->ProcessNewBlock(shared_pblock, true, true, nullptr)); | ||||
->ProcessNewBlock(config, shared_pblock, true, true, nullptr)); | |||||
pblock->hashPrevBlock = pblock->GetHash(); | pblock->hashPrevBlock = pblock->GetHash(); | ||||
} | } | ||||
LOCK(cs_main); | LOCK(cs_main); | ||||
LOCK(m_node.mempool->cs); | LOCK(m_node.mempool->cs); | ||||
TestBasicMining(chainparams, scriptPubKey, txFirst, baseheight); | TestBasicMining(chainparams, scriptPubKey, txFirst, baseheight); | ||||
▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines |