-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Net Processing: Move RelayTransaction() into PeerManager #21162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Net Processing: Move RelayTransaction() into PeerManager #21162
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 :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.