The Misbehaving() call is already inside an if (peer && ...) block.
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-
fanquake commented at 2:11 PM on October 30, 2026: member
-
66292fa4b5
net_processing: remove redundant peer check in MaybePunishNodeForBlock
The `Misbehaving()` call is already inside an `if (peer && ...)` block.
-
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
- Code coverage & benchmarks: https://corecheck.dev/bitcoin/bitcoin/pulls/36707
- Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/36707.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/36707#author-ralph
<!--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><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
-
Crypt-iQ commented at 3:39 PM on October 30, 2026: contributor
crACK 66292fa4b575ef193ab2363391399cec29bf3503
-
ViniciusCestarii commented at 6:17 PM on October 30, 2026: contributor
ACK 66292fa4b575ef193ab2363391399cec29bf3503
- l0rinc approved
-
l0rinc commented at 6:40 PM on October 30, 2026: contributor
ACK 66292fa4b575ef193ab2363391399cec29bf3503
Looks safe since
peercannot be reseated between the checks. nit: if you touch again considerconst PeerRef peerto make that even clearer. -
jpk68 commented at 8:01 PM on October 30, 2026: contributor
ACK 66292fa4b575ef193ab2363391399cec29bf3503
-
brunoerg commented at 1:27 PM on November 2, 2026: contributor
ACK 66292fa4b575ef193ab2363391399cec29bf3503
- sedited merged this on Nov 3, 2026
- sedited closed this on Nov 3, 2026
- fanquake deleted the branch on Nov 3, 2026