diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-01-24 14:00:57 -0500 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-03-12 09:23:56 -0400 |
commit | fa7fea3654203bf7e7bd504589dd564af7fc749d (patch) | |
tree | 4e2987ec25b64618340af4afd61638038e96fb66 /src/net_processing.h | |
parent | 309b0c4c19319a8e0fd3fd7ff82ef9ebb2803072 (diff) |
refactor: Remove mempool global from net
This refactor does two things:
* Pass mempool in to PeerLogicValidation
* Pass m_mempool around where needed
Diffstat (limited to 'src/net_processing.h')
-rw-r--r-- | src/net_processing.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/net_processing.h b/src/net_processing.h index 6f26abc209..b73037722c 100644 --- a/src/net_processing.h +++ b/src/net_processing.h @@ -6,10 +6,12 @@ #ifndef BITCOIN_NET_PROCESSING_H #define BITCOIN_NET_PROCESSING_H -#include <net.h> -#include <validationinterface.h> #include <consensus/params.h> +#include <net.h> #include <sync.h> +#include <validationinterface.h> + +class CTxMemPool; extern RecursiveMutex cs_main; @@ -23,11 +25,12 @@ class PeerLogicValidation final : public CValidationInterface, public NetEventsI private: CConnman* const connman; BanMan* const m_banman; + CTxMemPool& m_mempool; bool CheckIfBanned(CNode* pnode) EXCLUSIVE_LOCKS_REQUIRED(cs_main); public: - PeerLogicValidation(CConnman* connman, BanMan* banman, CScheduler& scheduler); + PeerLogicValidation(CConnman* connman, BanMan* banman, CScheduler& scheduler, CTxMemPool& pool); /** * Overridden from CValidationInterface. |