mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-21 22:31:21 +02:00
test: Pass empty tx pool to block assembler
This commit is contained in:
parent
fa96574b0d
commit
fa11ff2980
@ -215,10 +215,10 @@ TestChain100Setup::TestChain100Setup()
|
|||||||
CBlock TestChain100Setup::CreateAndProcessBlock(const std::vector<CMutableTransaction>& txns, const CScript& scriptPubKey)
|
CBlock TestChain100Setup::CreateAndProcessBlock(const std::vector<CMutableTransaction>& txns, const CScript& scriptPubKey)
|
||||||
{
|
{
|
||||||
const CChainParams& chainparams = Params();
|
const CChainParams& chainparams = Params();
|
||||||
CBlock block = BlockAssembler(*m_node.mempool, chainparams).CreateNewBlock(scriptPubKey)->block;
|
CTxMemPool empty_pool;
|
||||||
|
CBlock block = BlockAssembler(empty_pool, chainparams).CreateNewBlock(scriptPubKey)->block;
|
||||||
|
|
||||||
// Replace mempool-selected txns with just coinbase plus passed-in txns:
|
Assert(block.vtx.size() == 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));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user