aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.h
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-03-18 14:25:27 +0800
committerfanquake <fanquake@gmail.com>2021-03-18 14:57:50 +0800
commite057e01b7b7bf537c2f3b23bb56821e7c0e5a24c (patch)
tree788d6d5f2521bc914a0441925c219fe24a154f63 /src/net_processing.h
parentbf7c22f7ff83c1e16dfbc1496bdd5d278ccee2d9 (diff)
parent680eb56d828ce358b4e000c140f5b247ff5e6179 (diff)
downloadbitcoin-e057e01b7b7bf537c2f3b23bb56821e7c0e5a24c.tar.xz
Merge #21162: Net Processing: Move RelayTransaction() into PeerManager
680eb56d828ce358b4e000c140f5b247ff5e6179 [net processing] Don't pass CConnman to RelayTransactions (John Newbery) a38a4e8f039dfabfd9435f3a63f1a9b56de086d6 [net processing] Move RelayTransaction into PeerManager (John Newbery) Pull request description: This is the first part of #21160. It moves the RelayTransaction() function to be a member function of the PeerManager class. This is required in order to move the transaction inventory data into the Peer object, since Peer objects are only accessible from within PeerManager. ACKs for top commit: ajtowns: ACK 680eb56d828ce358b4e000c140f5b247ff5e6179 Tree-SHA512: 8c93491a4392b6369bb7f090de326a63cd62a088de59026e202f226f64ded50a0cf1a95ed703328860f02a9d2f64d3a87ca1bca9a6075b978bd111d384766235
Diffstat (limited to 'src/net_processing.h')
-rw-r--r--src/net_processing.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/net_processing.h b/src/net_processing.h
index 6f900410a7..f6f2d73721 100644
--- a/src/net_processing.h
+++ b/src/net_processing.h
@@ -47,6 +47,10 @@ public:
/** Whether this node ignores txs received over p2p. */
virtual bool IgnoresIncomingTxs() = 0;
+ /** Relay transaction to all peers. */
+ virtual void RelayTransaction(const uint256& txid, const uint256& wtxid)
+ EXCLUSIVE_LOCKS_REQUIRED(cs_main) = 0;
+
/** Send ping message to all peers */
virtual void SendPings() = 0;
@@ -71,7 +75,4 @@ public:
const std::chrono::microseconds time_received, const std::atomic<bool>& interruptMsgProc) = 0;
};
-/** Relay transaction to every node */
-void RelayTransaction(const uint256& txid, const uint256& wtxid, const CConnman& connman) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
-
#endif // BITCOIN_NET_PROCESSING_H