rpc: Remove mempool global from miner

This commit is contained in:
MarcoFalke
2019-12-17 07:11:44 +07:00
parent 6666ef13f1
commit faa92a2297
13 changed files with 92 additions and 53 deletions

View File

@@ -30,6 +30,7 @@ struct MinerTestingSetup : public TestingSetup {
{
return CheckSequenceLocks(*m_node.mempool, tx, flags);
}
BlockAssembler AssemblerForTest(const CChainParams& params);
};
} // namespace miner_tests
@@ -48,12 +49,13 @@ private:
static CFeeRate blockMinFeeRate = CFeeRate(DEFAULT_BLOCK_MIN_TX_FEE);
static BlockAssembler AssemblerForTest(const CChainParams& params) {
BlockAssembler MinerTestingSetup::AssemblerForTest(const CChainParams& params)
{
BlockAssembler::Options options;
options.nBlockMaxWeight = MAX_BLOCK_WEIGHT;
options.blockMinFeeRate = blockMinFeeRate;
return BlockAssembler(params, options);
return BlockAssembler(*m_node.mempool, params, options);
}
constexpr static struct {