diff options
Diffstat (limited to 'src/interfaces/chain.cpp')
-rw-r--r-- | src/interfaces/chain.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/interfaces/chain.cpp b/src/interfaces/chain.cpp index da810bc5e6..d3d9e86e8d 100644 --- a/src/interfaces/chain.cpp +++ b/src/interfaces/chain.cpp @@ -8,6 +8,7 @@ #include <chainparams.h> #include <primitives/block.h> #include <sync.h> +#include <txmempool.h> #include <uint256.h> #include <util/system.h> #include <validation.h> @@ -177,6 +178,13 @@ public: LOCK(cs_main); return GuessVerificationProgress(Params().TxData(), LookupBlockIndex(block_hash)); } + void requestMempoolTransactions(std::function<void(const CTransactionRef&)> fn) override + { + LOCK2(::cs_main, ::mempool.cs); + for (const CTxMemPoolEntry& entry : ::mempool.mapTx) { + fn(entry.GetSharedTx()); + } + } }; } // namespace |