Changeset View
Changeset View
Standalone View
Standalone View
src/test/blockfilter_index_tests.cpp
Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | static bool BuildChain(const CBlockIndex *pindex, | ||||
chain.resize(length); | chain.resize(length); | ||||
for (auto &block : chain) { | for (auto &block : chain) { | ||||
block = std::make_shared<CBlock>( | block = std::make_shared<CBlock>( | ||||
CreateBlock(pindex, no_txns, coinbase_script_pub_key, mempool)); | CreateBlock(pindex, no_txns, coinbase_script_pub_key, mempool)); | ||||
CBlockHeader header = block->GetBlockHeader(); | CBlockHeader header = block->GetBlockHeader(); | ||||
CValidationState state; | CValidationState state; | ||||
if (!ProcessNewBlockHeaders(GetConfig(), {header}, state, &pindex, | if (!ProcessNewBlockHeaders(GetConfig(), {header}, state, &pindex)) { | ||||
nullptr)) { | |||||
return false; | return false; | ||||
} | } | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
BOOST_FIXTURE_TEST_CASE(blockfilter_index_initial_sync, TestChain100Setup) { | BOOST_FIXTURE_TEST_CASE(blockfilter_index_initial_sync, TestChain100Setup) { | ||||
▲ Show 20 Lines • Show All 213 Lines • Show Last 20 Lines |