Skip to content

Conversation

jnewbery
Copy link
Contributor

@jnewbery jnewbery commented Feb 12, 2021

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.

@DrahtBot
Copy link
Contributor

DrahtBot commented Feb 12, 2021

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

No conflicts as of last run.

@jnewbery
Copy link
Contributor Author

Rebased. This is now ready for review.

@jnewbery jnewbery force-pushed the 2021-02-relay-transactions-peer-manager branch from 8f328fe to b7979f1 Compare February 16, 2021 13:30
@jnewbery jnewbery marked this pull request as ready for review February 16, 2021 13:30
@jnewbery jnewbery marked this pull request as draft February 17, 2021 20:12
@jnewbery jnewbery marked this pull request as ready for review February 17, 2021 20:36
@jnewbery jnewbery force-pushed the 2021-02-relay-transactions-peer-manager branch from b7979f1 to a0b480d Compare February 17, 2021 20:36
@jnewbery jnewbery marked this pull request as draft February 17, 2021 21:45
@jnewbery jnewbery force-pushed the 2021-02-relay-transactions-peer-manager branch from a0b480d to a101657 Compare February 18, 2021 09:24
@jnewbery
Copy link
Contributor Author

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.

@jnewbery jnewbery marked this pull request as ready for review February 18, 2021 09:25
@jnewbery jnewbery force-pushed the 2021-02-relay-transactions-peer-manager branch from a101657 to 1141e84 Compare February 19, 2021 14:55
@ajtowns
Copy link
Contributor

ajtowns commented Mar 3, 2021

Concept ACK, but ignoring for now since drahtbot says it conflicts with txorphanage

jnewbery added 2 commits March 4, 2021 10:22
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.
@jnewbery jnewbery force-pushed the 2021-02-relay-transactions-peer-manager branch from 1141e84 to 680eb56 Compare March 4, 2021 10:23
@jnewbery
Copy link
Contributor Author

jnewbery commented Mar 4, 2021

Rebased

Concept ACK, but ignoring for now since drahtbot says it conflicts with txorphanage

@ajtowns txorphange merged. This is now ready for review :)

Copy link
Contributor

@ajtowns ajtowns left a 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.

@DrahtBot
Copy link
Contributor

🕵️ @sipa has been requested to review this pull request as specified in the REVIEWERS file.

@ajtowns
Copy link
Contributor

ajtowns commented Mar 18, 2021

ACK 680eb56

@fanquake fanquake merged commit e057e01 into bitcoin:master Mar 18, 2021
@jnewbery jnewbery deleted the 2021-02-relay-transactions-peer-manager branch March 18, 2021 08:58
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Mar 18, 2021
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants