Changeset View
Changeset View
Standalone View
Standalone View
src/test/miner_tests.cpp
Show First 20 Lines • Show All 315 Lines • ▼ Show 20 Lines | for (size_t i = 0; i < sizeof(blockinfo) / sizeof(*blockinfo); ++i) { | ||||
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 = blockinfo[i].nonce; | pblock->nNonce = blockinfo[i].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(EnsureChainman(m_node).ProcessNewBlock( | BOOST_CHECK( | ||||
config, shared_pblock, true, nullptr)); | Assert(m_node.chainman) | ||||
->ProcessNewBlock(config, shared_pblock, 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); | ||||
// Just to make sure we can still make simple blocks. | // Just to make sure we can still make simple blocks. | ||||
BOOST_CHECK(pblocktemplate = | BOOST_CHECK(pblocktemplate = | ||||
▲ Show 20 Lines • Show All 416 Lines • Show Last 20 Lines |