Page MenuHomePhabricator

[refactor] Refactor misbehavior ban decisions to MaybePunishNode()

Authored by deadalnix on Tue, Jun 23, 15:16.



Isolate the decision of whether to ban a peer to one place in the
code, rather than having it sprinkled throughout net_processing.

Co-authored-by: Anthony Towns <>

Suhas Daftuar <>
John Newbery <>

This is a partial backport of Core PR15141 :

Slightly modified because the original screws with locks and only fixes it toward the end.

Test Plan
ninja all check-all

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

deadalnix created this revision.Tue, Jun 23, 15:16
Herald added a reviewer: Restricted Project. · View Herald TranscriptTue, Jun 23, 15:16
deadalnix requested review of this revision.Tue, Jun 23, 15:16
teamcity edited the summary of this revision. (Show Details)Tue, Jun 23, 15:16

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

Fabien accepted this revision.Tue, Jun 23, 15:47
Fabien added a subscriber: Fabien.
Fabien added inline comments.
3081 ↗(On Diff #21641)


3084 ↗(On Diff #21641)


This revision is now accepted and ready to land.Tue, Jun 23, 15:47
This revision was landed with ongoing or failed builds.Tue, Jun 23, 16:42
This revision was automatically updated to reflect the committed changes.