Net Processing: Move RelayTransaction() into PeerManager#21162
Net Processing: Move RelayTransaction() into PeerManager#21162fanquake merged 2 commits intobitcoin:masterfrom
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
|
Rebased. This is now ready for review. |
8f328fe to
b7979f1
Compare
b7979f1 to
a0b480d
Compare
a0b480d to
a101657
Compare
|
I've removed the last two commits in this PR, so this is now just moving RelayTransaction() into PeerManagerImp. The final two commits are difficult to separate from the rest of the "Move tx inventory into net_processing" change (#21160) without ugly lock taking/releasing. |
a101657 to
1141e84
Compare
|
Concept ACK, but ignoring for now since drahtbot says it conflicts with txorphanage |
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.
Use the local m_connman instead
1141e84 to
680eb56
Compare
|
Rebased
@ajtowns txorphange merged. This is now ready for review :) |
ajtowns
left a comment
There was a problem hiding this comment.
Approach ACK; not convinced about the non-const bit.
|
🕵️ @sipa has been requested to review this pull request as specified in the REVIEWERS file. |
|
ACK 680eb56 |
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.