diff options
author | João Barbosa <joao.paulo.barbosa@gmail.com> | 2019-03-27 17:00:06 +0000 |
---|---|---|
committer | João Barbosa <joao.paulo.barbosa@gmail.com> | 2019-03-31 11:37:28 +0100 |
commit | 57908a739ca377d60ef224ce0f565d4412a414f4 (patch) | |
tree | 985bb1d2e0bf3477e40faef44aa96d209d17b6e1 /src/interfaces/chain.h | |
parent | 0440481c6bf5683eff669c789bdf6a306d99adc5 (diff) |
interfaces: Add Chain::requestMempoolTransactions
Diffstat (limited to 'src/interfaces/chain.h')
-rw-r--r-- | src/interfaces/chain.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h index a9b05f27fc..d11a59241e 100644 --- a/src/interfaces/chain.h +++ b/src/interfaces/chain.h @@ -269,6 +269,16 @@ public: //! Register handler for RPC. Command is not copied, so reference //! needs to remain valid until Handler is disconnected. virtual std::unique_ptr<Handler> handleRpc(const CRPCCommand& command) = 0; + + //! Synchronously send TransactionAddedToMempool notifications about all + //! current mempool transactions to the specified handler and return after + //! the last one is sent. These notifications aren't coordinated with async + //! notifications sent by handleNotifications, so out of date async + //! notifications from handleNotifications can arrive during and after + //! synchronous notifications from requestMempoolTransactions. Clients need + //! to be prepared to handle this by ignoring notifications about unknown + //! removed transactions and already added new transactions. + virtual void requestMempoolTransactions(Notifications& notifications) = 0; }; //! Interface to let node manage chain clients (wallets, or maybe tools for |