From 89eeb4a3335f8e871cc3f5286af4546dff66172a Mon Sep 17 00:00:00 2001 From: Amiti Uttarwar Date: Wed, 29 Jan 2020 08:12:59 -0800 Subject: [mempool] Track "unbroadcast" transactions - Mempool tracks locally submitted transactions (wallet or rpc) - Transactions are removed from set when the node receives a GETDATA request from a peer, or if the transaction is removed from the mempool. --- src/node/transaction.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/node') diff --git a/src/node/transaction.cpp b/src/node/transaction.cpp index 201406ce3b..3841d8687d 100644 --- a/src/node/transaction.cpp +++ b/src/node/transaction.cpp @@ -78,6 +78,10 @@ TransactionError BroadcastTransaction(NodeContext& node, const CTransactionRef t } if (relay) { + // the mempool tracks locally submitted transactions to make a + // best-effort of initial broadcast + node.mempool->AddUnbroadcastTx(hashTx); + RelayTransaction(hashTx, *node.connman); } -- cgit v1.2.3