refactor : use RelayTransaction in BroadcastTransaction utility

To do so, we also refactor RelayTransaction to take a txid
instead of passing a tx
This commit is contained in:
Antoine Riard
2019-07-24 17:27:49 -04:00
parent 0626b8cbdf
commit 9bc8b28c1d
4 changed files with 13 additions and 12 deletions

View File

@@ -9,6 +9,7 @@
#include <interfaces/handler.h>
#include <interfaces/wallet.h>
#include <net.h>
#include <net_processing.h>
#include <node/coin.h>
#include <policy/fees.h>
#include <policy/policy.h>
@@ -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
{