Changeset View
Changeset View
Standalone View
Standalone View
src/test/validation_block_tests.cpp
Show First 20 Lines • Show All 143 Lines • ▼ Show 20 Lines | BOOST_AUTO_TEST_CASE(processnewblock_signals_ordering) { | ||||
while (blocks.size() < 50) { | while (blocks.size() < 50) { | ||||
blocks.clear(); | blocks.clear(); | ||||
BuildChain(config, *m_node.mempool, | BuildChain(config, *m_node.mempool, | ||||
chainParams.GenesisBlock().GetHash(), 100, 15, 10, 500, | chainParams.GenesisBlock().GetHash(), 100, 15, 10, 500, | ||||
blocks); | blocks); | ||||
} | } | ||||
bool ignored; | bool ignored; | ||||
CValidationState state; | BlockValidationState state; | ||||
std::vector<CBlockHeader> headers; | std::vector<CBlockHeader> headers; | ||||
std::transform( | std::transform( | ||||
blocks.begin(), blocks.end(), std::back_inserter(headers), | blocks.begin(), blocks.end(), std::back_inserter(headers), | ||||
[](std::shared_ptr<const CBlock> b) { return b->GetBlockHeader(); }); | [](std::shared_ptr<const CBlock> b) { return b->GetBlockHeader(); }); | ||||
// Process all the headers so we understand the toplogy of the chain | // Process all the headers so we understand the toplogy of the chain | ||||
BOOST_CHECK(ProcessNewBlockHeaders(config, headers, state)); | BOOST_CHECK(ProcessNewBlockHeaders(config, headers, state)); | ||||
▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines |