interfaces: Add Chain::requestMempoolTransactions

This commit is contained in:
João Barbosa
2019-03-27 17:00:06 +00:00
parent 0440481c6b
commit 57908a739c
2 changed files with 17 additions and 0 deletions

View File

@@ -367,6 +367,13 @@ public:
{
return MakeUnique<RpcHandlerImpl>(command);
}
void requestMempoolTransactions(Notifications& notifications) override
{
LOCK2(::cs_main, ::mempool.cs);
for (const CTxMemPoolEntry& entry : ::mempool.mapTx) {
notifications.TransactionAddedToMempool(entry.GetSharedTx());
}
}
};
} // namespace