Changeset View
Changeset View
Standalone View
Standalone View
src/test/blockfilter_index_tests.cpp
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | static bool CheckFilterLookups(BlockFilterIndex &filter_index, | ||||
return true; | return true; | ||||
} | } | ||||
CBlock BuildChainTestingSetup::CreateBlock( | CBlock BuildChainTestingSetup::CreateBlock( | ||||
const CBlockIndex *prev, const std::vector<CMutableTransaction> &txns, | const CBlockIndex *prev, const std::vector<CMutableTransaction> &txns, | ||||
const CScript &scriptPubKey) { | const CScript &scriptPubKey) { | ||||
const Config &config = GetConfig(); | const Config &config = GetConfig(); | ||||
std::unique_ptr<CBlockTemplate> pblocktemplate = | std::unique_ptr<CBlockTemplate> pblocktemplate = | ||||
BlockAssembler(config, *m_node.mempool) | BlockAssembler(config, ::ChainstateActive(), *m_node.mempool) | ||||
.CreateNewBlock(::ChainstateActive(), scriptPubKey); | .CreateNewBlock(scriptPubKey); | ||||
CBlock &block = pblocktemplate->block; | CBlock &block = pblocktemplate->block; | ||||
block.hashPrevBlock = prev->GetBlockHash(); | block.hashPrevBlock = prev->GetBlockHash(); | ||||
block.nTime = prev->nTime + 1; | block.nTime = prev->nTime + 1; | ||||
// Replace mempool-selected txns with just coinbase plus passed-in txns: | // Replace mempool-selected txns with just coinbase plus passed-in txns: | ||||
block.vtx.resize(1); | block.vtx.resize(1); | ||||
for (const CMutableTransaction &tx : txns) { | for (const CMutableTransaction &tx : txns) { | ||||
block.vtx.push_back(MakeTransactionRef(tx)); | block.vtx.push_back(MakeTransactionRef(tx)); | ||||
▲ Show 20 Lines • Show All 257 Lines • Show Last 20 Lines |