net_processing: remove redundant `peer` check in `MaybePunishNodeForBlock` #36707

pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:redundant_peer_check changing 1 files +1 −1
  1. fanquake commented at 2:11 PM on October 30, 2026: member

    The Misbehaving() call is already inside an if (peer && ...) block.

  2. net_processing: remove redundant peer check in MaybePunishNodeForBlock
    The `Misbehaving()` call is already inside an `if (peer && ...)` block.
    66292fa4b5
  3. DrahtBot commented at 2:11 PM on October 30, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    ACK Crypt-iQ, ViniciusCestarii, l0rinc, jpk68, brunoerg

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. Crypt-iQ commented at 3:39 PM on October 30, 2026: contributor

    crACK 66292fa4b575ef193ab2363391399cec29bf3503

  5. ViniciusCestarii commented at 6:17 PM on October 30, 2026: contributor

    ACK 66292fa4b575ef193ab2363391399cec29bf3503

  6. l0rinc approved
  7. l0rinc commented at 6:40 PM on October 30, 2026: contributor

    ACK 66292fa4b575ef193ab2363391399cec29bf3503

    Looks safe since peer cannot be reseated between the checks. nit: if you touch again consider const PeerRef peer to make that even clearer.

  8. jpk68 commented at 8:01 PM on October 30, 2026: contributor

    ACK 66292fa4b575ef193ab2363391399cec29bf3503

  9. brunoerg commented at 1:27 PM on November 2, 2026: contributor

    ACK 66292fa4b575ef193ab2363391399cec29bf3503

  10. sedited merged this on Nov 3, 2026
  11. sedited closed this on Nov 3, 2026

  12. fanquake deleted the branch on Nov 3, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-11-15 02:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me