HomePhabricator

p2p: refactor: tidy up `PeerManagerImpl::Misbehaving(...)`

Description

p2p: refactor: tidy up PeerManagerImpl::Misbehaving(...)

Summary:

  • introduce constant variables score_before and score_after in order to improve readability
  • deduplicate calls to LogPrint(), eliminates else-branch
  • update BAN to DISCOURAGE in logs (missed in D6506)

This is a backport of core#22495

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D13342

Details

Provenance
Sebastian Falbesoner <sebastian.falbesoner@gmail.com>Authored on Jul 12 2021, 21:53
PiRKCommitted on Mar 16 2023, 07:01
PiRKPushed on Mar 16 2023, 07:01
Reviewer
Restricted Project
Differential Revision
D13342: p2p: refactor: tidy up `PeerManagerImpl::Misbehaving(...)`
Parents
rABCc41a5f30b563: [alias-server] Add function to get only unprocessed txs from chronik tx history
Branches
Unknown
Tags
Unknown