Skip to content

Commit fa7fea3

Browse files
author
MarcoFalke
committed
refactor: Remove mempool global from net
This refactor does two things: * Pass mempool in to PeerLogicValidation * Pass m_mempool around where needed
1 parent 309b0c4 commit fa7fea3

File tree

6 files changed

+49
-44
lines changed

6 files changed

+49
-44
lines changed

src/init.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,8 +1329,12 @@ bool AppInitMain(NodeContext& node)
13291329
node.banman = MakeUnique<BanMan>(GetDataDir() / "banlist.dat", &uiInterface, gArgs.GetArg("-bantime", DEFAULT_MISBEHAVING_BANTIME));
13301330
assert(!node.connman);
13311331
node.connman = std::unique_ptr<CConnman>(new CConnman(GetRand(std::numeric_limits<uint64_t>::max()), GetRand(std::numeric_limits<uint64_t>::max())));
1332+
// Make mempool generally available in the node context. For example the connection manager, wallet, or RPC threads,
1333+
// which are all started after this, may use it from the node context.
1334+
assert(!node.mempool);
1335+
node.mempool = &::mempool;
13321336

1333-
node.peer_logic.reset(new PeerLogicValidation(node.connman.get(), node.banman.get(), *node.scheduler));
1337+
node.peer_logic.reset(new PeerLogicValidation(node.connman.get(), node.banman.get(), *node.scheduler, *node.mempool));
13341338
RegisterValidationInterface(node.peer_logic.get());
13351339

13361340
// sanitize comments per BIP-0014, format user agent and check total size
@@ -1678,11 +1682,6 @@ bool AppInitMain(NodeContext& node)
16781682
return false;
16791683
}
16801684

1681-
// Now that the chain state is loaded, make mempool generally available in the node context. For example the
1682-
// connection manager, wallet, or RPC threads, which are all started after this, may use it from the node context.
1683-
assert(!node.mempool);
1684-
node.mempool = &::mempool;
1685-
16861685
fs::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME;
16871686
CAutoFile est_filein(fsbridge::fopen(est_path, "rb"), SER_DISK, CLIENT_VERSION);
16881687
// Allowed to fail as this file IS missing on first startup.

src/net_processing.cpp

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ static bool MarkBlockAsReceived(const uint256& hash) EXCLUSIVE_LOCKS_REQUIRED(cs
465465

466466
// returns false, still setting pit, if the block was already in flight from the same peer
467467
// pit will only be valid as long as the same cs_main lock is being held
468-
static bool MarkBlockAsInFlight(NodeId nodeid, const uint256& hash, const CBlockIndex* pindex = nullptr, std::list<QueuedBlock>::iterator** pit = nullptr) EXCLUSIVE_LOCKS_REQUIRED(cs_main) {
468+
static bool MarkBlockAsInFlight(CTxMemPool& mempool, NodeId nodeid, const uint256& hash, const CBlockIndex* pindex = nullptr, std::list<QueuedBlock>::iterator** pit = nullptr) EXCLUSIVE_LOCKS_REQUIRED(cs_main) {
469469
CNodeState *state = State(nodeid);
470470
assert(state != nullptr);
471471

@@ -1102,8 +1102,11 @@ static bool BlockRequestAllowed(const CBlockIndex* pindex, const Consensus::Para
11021102
(GetBlockProofEquivalentTime(*pindexBestHeader, *pindex, *pindexBestHeader, consensusParams) < STALE_RELAY_AGE_LIMIT);
11031103
}
11041104

1105-
PeerLogicValidation::PeerLogicValidation(CConnman* connmanIn, BanMan* banman, CScheduler& scheduler)
1106-
: connman(connmanIn), m_banman(banman), m_stale_tip_check_time(0)
1105+
PeerLogicValidation::PeerLogicValidation(CConnman* connmanIn, BanMan* banman, CScheduler& scheduler, CTxMemPool& pool)
1106+
: connman(connmanIn),
1107+
m_banman(banman),
1108+
m_mempool(pool),
1109+
m_stale_tip_check_time(0)
11071110
{
11081111
// Initialize global variables that cannot be constructed at startup.
11091112
recentRejects.reset(new CRollingBloomFilter(120000, 0.000001));
@@ -1314,7 +1317,7 @@ void PeerLogicValidation::BlockChecked(const CBlock& block, const BlockValidatio
13141317
//
13151318

13161319

1317-
bool static AlreadyHave(const CInv& inv) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
1320+
bool static AlreadyHave(const CInv& inv, const CTxMemPool& mempool) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
13181321
{
13191322
switch (inv.type)
13201323
{
@@ -1553,7 +1556,7 @@ void static ProcessGetBlockData(CNode* pfrom, const CChainParams& chainparams, c
15531556
}
15541557
}
15551558

1556-
void static ProcessGetData(CNode* pfrom, const CChainParams& chainparams, CConnman* connman, const std::atomic<bool>& interruptMsgProc) LOCKS_EXCLUDED(cs_main)
1559+
void static ProcessGetData(CNode* pfrom, const CChainParams& chainparams, CConnman* connman, const CTxMemPool& mempool, const std::atomic<bool>& interruptMsgProc) LOCKS_EXCLUDED(cs_main)
15571560
{
15581561
AssertLockNotHeld(cs_main);
15591562

@@ -1666,7 +1669,7 @@ inline void static SendBlockTransactions(const CBlock& block, const BlockTransac
16661669
connman->PushMessage(pfrom, msgMaker.Make(nSendFlags, NetMsgType::BLOCKTXN, resp));
16671670
}
16681671

1669-
bool static ProcessHeadersMessage(CNode *pfrom, CConnman *connman, const std::vector<CBlockHeader>& headers, const CChainParams& chainparams, bool via_compact_block)
1672+
bool static ProcessHeadersMessage(CNode* pfrom, CConnman* connman, CTxMemPool& mempool, const std::vector<CBlockHeader>& headers, const CChainParams& chainparams, bool via_compact_block)
16701673
{
16711674
const CNetMsgMaker msgMaker(pfrom->GetSendVersion());
16721675
size_t nCount = headers.size();
@@ -1794,7 +1797,7 @@ bool static ProcessHeadersMessage(CNode *pfrom, CConnman *connman, const std::ve
17941797
}
17951798
uint32_t nFetchFlags = GetFetchFlags(pfrom);
17961799
vGetData.push_back(CInv(MSG_BLOCK | nFetchFlags, pindex->GetBlockHash()));
1797-
MarkBlockAsInFlight(pfrom->GetId(), pindex->GetBlockHash(), pindex);
1800+
MarkBlockAsInFlight(mempool, pfrom->GetId(), pindex->GetBlockHash(), pindex);
17981801
LogPrint(BCLog::NET, "Requesting block %s from peer=%d\n",
17991802
pindex->GetBlockHash().ToString(), pfrom->GetId());
18001803
}
@@ -1848,7 +1851,7 @@ bool static ProcessHeadersMessage(CNode *pfrom, CConnman *connman, const std::ve
18481851
return true;
18491852
}
18501853

1851-
void static ProcessOrphanTx(CConnman* connman, std::set<uint256>& orphan_work_set, std::list<CTransactionRef>& removed_txn) EXCLUSIVE_LOCKS_REQUIRED(cs_main, g_cs_orphans)
1854+
void static ProcessOrphanTx(CConnman* connman, CTxMemPool& mempool, std::set<uint256>& orphan_work_set, std::list<CTransactionRef>& removed_txn) EXCLUSIVE_LOCKS_REQUIRED(cs_main, g_cs_orphans)
18521855
{
18531856
AssertLockHeld(cs_main);
18541857
AssertLockHeld(g_cs_orphans);
@@ -1908,7 +1911,7 @@ void static ProcessOrphanTx(CConnman* connman, std::set<uint256>& orphan_work_se
19081911
}
19091912
}
19101913

1911-
bool ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStream& vRecv, int64_t nTimeReceived, const CChainParams& chainparams, CConnman* connman, BanMan* banman, const std::atomic<bool>& interruptMsgProc)
1914+
bool ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStream& vRecv, int64_t nTimeReceived, const CChainParams& chainparams, CTxMemPool& mempool, CConnman* connman, BanMan* banman, const std::atomic<bool>& interruptMsgProc)
19121915
{
19131916
LogPrint(BCLog::NET, "received: %s (%u bytes) peer=%d\n", SanitizeString(strCommand), vRecv.size(), pfrom->GetId());
19141917
if (gArgs.IsArgSet("-dropmessagestest") && GetRand(gArgs.GetArg("-dropmessagestest", 0)) == 0)
@@ -2260,7 +2263,7 @@ bool ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStream& vR
22602263
if (interruptMsgProc)
22612264
return true;
22622265

2263-
bool fAlreadyHave = AlreadyHave(inv);
2266+
bool fAlreadyHave = AlreadyHave(inv, mempool);
22642267
LogPrint(BCLog::NET, "got inv: %s %s peer=%d\n", inv.ToString(), fAlreadyHave ? "have" : "new", pfrom->GetId());
22652268

22662269
if (inv.type == MSG_TX) {
@@ -2311,7 +2314,7 @@ bool ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStream& vR
23112314
}
23122315

23132316
pfrom->vRecvGetData.insert(pfrom->vRecvGetData.end(), vInv.begin(), vInv.end());
2314-
ProcessGetData(pfrom, chainparams, connman, interruptMsgProc);
2317+
ProcessGetData(pfrom, chainparams, connman, mempool, interruptMsgProc);
23152318
return true;
23162319
}
23172320

@@ -2528,7 +2531,7 @@ bool ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStream& vR
25282531

25292532
std::list<CTransactionRef> lRemovedTxn;
25302533

2531-
if (!AlreadyHave(inv) &&
2534+
if (!AlreadyHave(inv, mempool) &&
25322535
AcceptToMemoryPool(mempool, state, ptx, &lRemovedTxn, false /* bypass_limits */, 0 /* nAbsurdFee */)) {
25332536
mempool.check(&::ChainstateActive().CoinsTip());
25342537
RelayTransaction(tx.GetHash(), *connman);
@@ -2549,7 +2552,7 @@ bool ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStream& vR
25492552
mempool.size(), mempool.DynamicMemoryUsage() / 1000);
25502553

25512554
// Recursively process any orphan transactions that depended on this one
2552-
ProcessOrphanTx(connman, pfrom->orphan_work_set, lRemovedTxn);
2555+
ProcessOrphanTx(connman, mempool, pfrom->orphan_work_set, lRemovedTxn);
25532556
}
25542557
else if (state.GetResult() == TxValidationResult::TX_MISSING_INPUTS)
25552558
{
@@ -2567,7 +2570,7 @@ bool ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStream& vR
25672570
for (const CTxIn& txin : tx.vin) {
25682571
CInv _inv(MSG_TX | nFetchFlags, txin.prevout.hash);
25692572
pfrom->AddInventoryKnown(_inv);
2570-
if (!AlreadyHave(_inv)) RequestTx(State(pfrom->GetId()), _inv.hash, current_time);
2573+
if (!AlreadyHave(_inv, mempool)) RequestTx(State(pfrom->GetId()), _inv.hash, current_time);
25712574
}
25722575
AddOrphanTx(ptx, pfrom->GetId());
25732576

@@ -2742,7 +2745,7 @@ bool ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStream& vR
27422745
if ((!fAlreadyInFlight && nodestate->nBlocksInFlight < MAX_BLOCKS_IN_TRANSIT_PER_PEER) ||
27432746
(fAlreadyInFlight && blockInFlightIt->second.first == pfrom->GetId())) {
27442747
std::list<QueuedBlock>::iterator* queuedBlockIt = nullptr;
2745-
if (!MarkBlockAsInFlight(pfrom->GetId(), pindex->GetBlockHash(), pindex, &queuedBlockIt)) {
2748+
if (!MarkBlockAsInFlight(mempool, pfrom->GetId(), pindex->GetBlockHash(), pindex, &queuedBlockIt)) {
27462749
if (!(*queuedBlockIt)->partialBlock)
27472750
(*queuedBlockIt)->partialBlock.reset(new PartiallyDownloadedBlock(&mempool));
27482751
else {
@@ -2815,15 +2818,15 @@ bool ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStream& vR
28152818
} // cs_main
28162819

28172820
if (fProcessBLOCKTXN)
2818-
return ProcessMessage(pfrom, NetMsgType::BLOCKTXN, blockTxnMsg, nTimeReceived, chainparams, connman, banman, interruptMsgProc);
2821+
return ProcessMessage(pfrom, NetMsgType::BLOCKTXN, blockTxnMsg, nTimeReceived, chainparams, mempool, connman, banman, interruptMsgProc);
28192822

28202823
if (fRevertToHeaderProcessing) {
28212824
// Headers received from HB compact block peers are permitted to be
28222825
// relayed before full validation (see BIP 152), so we don't want to disconnect
28232826
// the peer if the header turns out to be for an invalid block.
28242827
// Note that if a peer tries to build on an invalid chain, that
28252828
// will be detected and the peer will be banned.
2826-
return ProcessHeadersMessage(pfrom, connman, {cmpctblock.header}, chainparams, /*via_compact_block=*/true);
2829+
return ProcessHeadersMessage(pfrom, connman, mempool, {cmpctblock.header}, chainparams, /*via_compact_block=*/true);
28272830
}
28282831

28292832
if (fBlockReconstructed) {
@@ -2967,7 +2970,7 @@ bool ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStream& vR
29672970
ReadCompactSize(vRecv); // ignore tx count; assume it is 0.
29682971
}
29692972

2970-
return ProcessHeadersMessage(pfrom, connman, headers, chainparams, /*via_compact_block=*/false);
2973+
return ProcessHeadersMessage(pfrom, connman, mempool, headers, chainparams, /*via_compact_block=*/false);
29712974
}
29722975

29732976
if (strCommand == NetMsgType::BLOCK)
@@ -3285,12 +3288,12 @@ bool PeerLogicValidation::ProcessMessages(CNode* pfrom, std::atomic<bool>& inter
32853288
bool fMoreWork = false;
32863289

32873290
if (!pfrom->vRecvGetData.empty())
3288-
ProcessGetData(pfrom, chainparams, connman, interruptMsgProc);
3291+
ProcessGetData(pfrom, chainparams, connman, m_mempool, interruptMsgProc);
32893292

32903293
if (!pfrom->orphan_work_set.empty()) {
32913294
std::list<CTransactionRef> removed_txn;
32923295
LOCK2(cs_main, g_cs_orphans);
3293-
ProcessOrphanTx(connman, pfrom->orphan_work_set, removed_txn);
3296+
ProcessOrphanTx(connman, m_mempool, pfrom->orphan_work_set, removed_txn);
32943297
for (const CTransactionRef& removedTx : removed_txn) {
32953298
AddToCompactExtraTransactions(removedTx);
32963299
}
@@ -3353,7 +3356,7 @@ bool PeerLogicValidation::ProcessMessages(CNode* pfrom, std::atomic<bool>& inter
33533356
bool fRet = false;
33543357
try
33553358
{
3356-
fRet = ProcessMessage(pfrom, strCommand, vRecv, msg.m_time, chainparams, connman, m_banman, interruptMsgProc);
3359+
fRet = ProcessMessage(pfrom, strCommand, vRecv, msg.m_time, chainparams, m_mempool, connman, m_banman, interruptMsgProc);
33573360
if (interruptMsgProc)
33583361
return false;
33593362
if (!pfrom->vRecvGetData.empty())
@@ -3819,7 +3822,7 @@ bool PeerLogicValidation::SendMessages(CNode* pto)
38193822

38203823
// Respond to BIP35 mempool requests
38213824
if (fSendTrickle && pto->m_tx_relay->fSendMempool) {
3822-
auto vtxinfo = mempool.infoAll();
3825+
auto vtxinfo = m_mempool.infoAll();
38233826
pto->m_tx_relay->fSendMempool = false;
38243827
CFeeRate filterrate;
38253828
{
@@ -3865,7 +3868,7 @@ bool PeerLogicValidation::SendMessages(CNode* pto)
38653868
}
38663869
// Topologically and fee-rate sort the inventory we send for privacy and priority reasons.
38673870
// A heap is used so that not all items need sorting if only a few are being sent.
3868-
CompareInvMempoolOrder compareInvMempoolOrder(&mempool);
3871+
CompareInvMempoolOrder compareInvMempoolOrder(&m_mempool);
38693872
std::make_heap(vInvTx.begin(), vInvTx.end(), compareInvMempoolOrder);
38703873
// No reason to drain out at many times the network's capacity,
38713874
// especially since we have many peers and some will draw much shorter delays.
@@ -3884,7 +3887,7 @@ bool PeerLogicValidation::SendMessages(CNode* pto)
38843887
continue;
38853888
}
38863889
// Not in the mempool anymore? don't bother sending it.
3887-
auto txinfo = mempool.info(hash);
3890+
auto txinfo = m_mempool.info(hash);
38883891
if (!txinfo.tx) {
38893892
continue;
38903893
}
@@ -3996,7 +3999,7 @@ bool PeerLogicValidation::SendMessages(CNode* pto)
39963999
for (const CBlockIndex *pindex : vToDownload) {
39974000
uint32_t nFetchFlags = GetFetchFlags(pto);
39984001
vGetData.push_back(CInv(MSG_BLOCK | nFetchFlags, pindex->GetBlockHash()));
3999-
MarkBlockAsInFlight(pto->GetId(), pindex->GetBlockHash(), pindex);
4002+
MarkBlockAsInFlight(m_mempool, pto->GetId(), pindex->GetBlockHash(), pindex);
40004003
LogPrint(BCLog::NET, "Requesting block %s (%d) peer=%d\n", pindex->GetBlockHash().ToString(),
40014004
pindex->nHeight, pto->GetId());
40024005
}
@@ -4039,7 +4042,7 @@ bool PeerLogicValidation::SendMessages(CNode* pto)
40394042
// processing at a later time, see below)
40404043
tx_process_time.erase(tx_process_time.begin());
40414044
CInv inv(MSG_TX | GetFetchFlags(pto), txid);
4042-
if (!AlreadyHave(inv)) {
4045+
if (!AlreadyHave(inv, m_mempool)) {
40434046
// If this transaction was last requested more than 1 minute ago,
40444047
// then request.
40454048
const auto last_request_time = GetTxRequestTime(inv.hash);
@@ -4077,7 +4080,7 @@ bool PeerLogicValidation::SendMessages(CNode* pto)
40774080
// We don't want white listed peers to filter txs to us if we have -whitelistforcerelay
40784081
if (pto->m_tx_relay != nullptr && pto->nVersion >= FEEFILTER_VERSION && gArgs.GetBoolArg("-feefilter", DEFAULT_FEEFILTER) &&
40794082
!pto->HasPermission(PF_FORCERELAY)) {
4080-
CAmount currentFilter = mempool.GetMinFee(gArgs.GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFeePerK();
4083+
CAmount currentFilter = m_mempool.GetMinFee(gArgs.GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFeePerK();
40814084
int64_t timeNow = GetTimeMicros();
40824085
if (timeNow > pto->m_tx_relay->nextSendTimeFeeFilter) {
40834086
static CFeeRate default_feerate(DEFAULT_MIN_RELAY_TX_FEE);

src/net_processing.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
#ifndef BITCOIN_NET_PROCESSING_H
77
#define BITCOIN_NET_PROCESSING_H
88

9-
#include <net.h>
10-
#include <validationinterface.h>
119
#include <consensus/params.h>
10+
#include <net.h>
1211
#include <sync.h>
12+
#include <validationinterface.h>
13+
14+
class CTxMemPool;
1315

1416
extern RecursiveMutex cs_main;
1517

@@ -23,11 +25,12 @@ class PeerLogicValidation final : public CValidationInterface, public NetEventsI
2325
private:
2426
CConnman* const connman;
2527
BanMan* const m_banman;
28+
CTxMemPool& m_mempool;
2629

2730
bool CheckIfBanned(CNode* pnode) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
2831

2932
public:
30-
PeerLogicValidation(CConnman* connman, BanMan* banman, CScheduler& scheduler);
33+
PeerLogicValidation(CConnman* connman, BanMan* banman, CScheduler& scheduler, CTxMemPool& pool);
3134

3235
/**
3336
* Overridden from CValidationInterface.

src/test/denialofservice_tests.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ BOOST_FIXTURE_TEST_SUITE(denialofservice_tests, TestingSetup)
7878
BOOST_AUTO_TEST_CASE(outbound_slow_chain_eviction)
7979
{
8080
auto connman = MakeUnique<CConnman>(0x1337, 0x1337);
81-
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), nullptr, *m_node.scheduler);
81+
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), nullptr, *m_node.scheduler, *m_node.mempool);
8282

8383
// Mock an outbound peer
8484
CAddress addr1(ip(0xa0b0c001), NODE_NONE);
@@ -148,7 +148,7 @@ static void AddRandomOutboundPeer(std::vector<CNode *> &vNodes, PeerLogicValidat
148148
BOOST_AUTO_TEST_CASE(stale_tip_peer_management)
149149
{
150150
auto connman = MakeUnique<CConnmanTest>(0x1337, 0x1337);
151-
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), nullptr, *m_node.scheduler);
151+
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), nullptr, *m_node.scheduler, *m_node.mempool);
152152

153153
const Consensus::Params& consensusParams = Params().GetConsensus();
154154
constexpr int max_outbound_full_relay = 8;
@@ -221,7 +221,7 @@ BOOST_AUTO_TEST_CASE(DoS_banning)
221221
{
222222
auto banman = MakeUnique<BanMan>(GetDataDir() / "banlist.dat", nullptr, DEFAULT_MISBEHAVING_BANTIME);
223223
auto connman = MakeUnique<CConnman>(0x1337, 0x1337);
224-
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), banman.get(), *m_node.scheduler);
224+
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), banman.get(), *m_node.scheduler, *m_node.mempool);
225225

226226
banman->ClearBanned();
227227
CAddress addr1(ip(0xa0b0c001), NODE_NONE);
@@ -276,7 +276,7 @@ BOOST_AUTO_TEST_CASE(DoS_banscore)
276276
{
277277
auto banman = MakeUnique<BanMan>(GetDataDir() / "banlist.dat", nullptr, DEFAULT_MISBEHAVING_BANTIME);
278278
auto connman = MakeUnique<CConnman>(0x1337, 0x1337);
279-
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), banman.get(), *m_node.scheduler);
279+
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), banman.get(), *m_node.scheduler, *m_node.mempool);
280280

281281
banman->ClearBanned();
282282
gArgs.ForceSetArg("-banscore", "111"); // because 11 is my favorite number
@@ -323,7 +323,7 @@ BOOST_AUTO_TEST_CASE(DoS_bantime)
323323
{
324324
auto banman = MakeUnique<BanMan>(GetDataDir() / "banlist.dat", nullptr, DEFAULT_MISBEHAVING_BANTIME);
325325
auto connman = MakeUnique<CConnman>(0x1337, 0x1337);
326-
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), banman.get(), *m_node.scheduler);
326+
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), banman.get(), *m_node.scheduler, *m_node.mempool);
327327

328328
banman->ClearBanned();
329329
int64_t nStartTime = GetTime();

0 commit comments

Comments
 (0)