Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Oct 24, 2022

It is never a nullptr, otherwise an assertion would fire in UpdatePeerStateForReceivedHeaders.

Passing a reference makes the code easier to read and less brittle.

It is never a nullptr, otherwise an assertion would fire in
UpdatePeerStateForReceivedHeaders.

Passing a reference makes the code easier to read and less brittle.
@DrahtBot
Copy link
Contributor

DrahtBot commented Oct 24, 2022

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

Reviews

See the guideline for information on the review process.

Type Count Reviewers
ACK 2 aureleoules, john-moffett
Concept ACK 1 dergoegge

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #26140 (refactor: Move CNodeState members guarded by g_msgproc_mutex to Peer by dergoegge)
  • #25268 (refactor: Introduce EvictionManager by dergoegge)
  • #24571 (p2p: Prevent block index fingerprinting by sending additional getheaders messages by dergoegge)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@dergoegge
Copy link
Member

Concept ACK

@john-moffett
Copy link
Contributor

ACK fa579f3

Code review and rebased on master. Built/tests/ran bitcoind. Agree with using assert instead of Assume. The renamed parameters are clearer.

I don't know the policy on unrelated spelling corrections, but maybe this is a good place to fix the log line at 2867:

LogPrint(BCLog::NET, "more getheaders (%d) to end to peer=%d (startheight:%d)\n",

I think it should read "to send to" rather than "to end to".

@maflcko
Copy link
Member Author

maflcko commented Nov 1, 2022

"to end" is correct, meaning "to their chain tip"

Copy link
Contributor

@aureleoules aureleoules left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fa579f3

@maflcko maflcko merged commit 5126e62 into bitcoin:master Dec 8, 2022
@maflcko maflcko deleted the 2210-p2p-less-pointers-🍟 branch December 8, 2022 16:08
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Dec 8, 2022
@bitcoin bitcoin locked and limited conversation to collaborators Dec 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants