mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-05 18:52:29 +02:00
Merge #16452: refactor: use RelayTransaction in BroadcastTransaction utility
9bc8b28c1drefactor : use RelayTransaction in BroadcastTransaction utility (Antoine Riard) Pull request description: Implementing suggestion in https://github.com/bitcoin/bitcoin/pull/15713#discussion_r306571420. Seems a reason of these node utilities is to glue with already there functions, so we should reuse them. ACKs for top commit: MarcoFalke: ACK9bc8b28c1dpromag: ACK9bc8b28c1d, verified there are no more `PushInventory(CInv(MSG_TX, ...`, nice refactor, 👍 @amitiuttarwar. jnewbery: ACK9bc8b28c1djonatack: ACK9bc8b28c1d, second @jnewbery's suggestions, my guess is they could be added without risking delaying this PR. Tree-SHA512: 841c65d5f0d9ead5380814bb2260d7ebf03f2a9bfa58a1025785d353bdb42f9122cc257993e6a7bd2bd3f2c74db19c5978cc14be0d83258124ca22e33d6d0164
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user