From 9bc8b28c1d26c28edf4bbc890be97c0ad7a73cb9 Mon Sep 17 00:00:00 2001 From: Antoine Riard Date: Wed, 24 Jul 2019 17:27:49 -0400 Subject: refactor : use RelayTransaction in BroadcastTransaction utility To do so, we also refactor RelayTransaction to take a txid instead of passing a tx --- src/interfaces/chain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/interfaces/chain.cpp') diff --git a/src/interfaces/chain.cpp b/src/interfaces/chain.cpp index 02f39cef8..22e4aaeda 100644 --- a/src/interfaces/chain.cpp +++ b/src/interfaces/chain.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -292,8 +293,7 @@ public: } void relayTransaction(const uint256& txid) override { - CInv inv(MSG_TX, txid); - g_connman->ForEachNode([&inv](CNode* node) { node->PushInventory(inv); }); + RelayTransaction(txid, *g_connman); } void getTransactionAncestry(const uint256& txid, size_t& ancestors, size_t& descendants) override { -- cgit v1.2.3