mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
[net processing] Move RelayTransaction into PeerManager
We don't mark RelayTransaction as const. Even though it doesn't mutate PeerManagerImpl state, it _is_ mutating the internal state of a CNode object, by updating setInventoryTxToSend. In a subsequent commit, that field will be moved to the Peer object, which is owned by PeerMangerImpl. This requires PeerManagerImpl::ReattemptInitialBroadcast() to no longer be const.
This commit is contained in:
@@ -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, const CConnman& connman)
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user