interfaces: Expose raw CTxMemPool via interfaces::Node

This commit is contained in:
Luke Dashjr 2023-08-18 00:08:28 +00:00
parent 41cf4b94e0
commit 654ee797d9
2 changed files with 4 additions and 0 deletions

View File

@ -26,6 +26,7 @@
class BanMan;
class CFeeRate;
class CNodeStats;
class CTxMemPool;
class Coin;
class RPCTimerInterface;
class UniValue;
@ -157,6 +158,8 @@ public:
//! Get total bytes sent.
virtual int64_t getTotalBytesSent() = 0;
virtual CTxMemPool& mempool() = 0;
//! Get mempool size.
virtual size_t getMempoolSize() = 0;

View File

@ -425,6 +425,7 @@ public:
}
ArgsManager& args() { return *Assert(Assert(m_context)->args); }
ChainstateManager& chainman() { return *Assert(m_context->chainman); }
CTxMemPool& mempool() override { return *Assert(m_context->mempool); }
NodeContext* m_context{nullptr};
};