HomePhabricator

refactor: Introduce PeerManagerImpl::RejectIncomingTxs

Description

refactor: Introduce PeerManagerImpl::RejectIncomingTxs

Summary:
Currently there are some confusions in net_processing:

  • There is confusion between -blocksonly mode and block-relay-only, so adjust all comments to use the same nomenclature.
  • Whether to disconnect peers for providing invs/txs is implemented differently. For example, it seems a bit confusing to disconnect block-relay-only peers with relay permission when they send a tx message, but not when they send an inv message. Also, keeping track of their inv announcements seems both wasteful and confusing, as it does nothing. This isn't possible in practice, as outbound connections do not have permissions assigned, but sees fragile to rely on. Especially in light of proposed changes to make that possible: https://github.com/bitcoin/bitcoin/pull/17167

This is a backport of core#25156

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
MacroFake <falke.marco@gmail.com>Authored on May 17 2022, 13:25
PiRKCommitted on Sep 23 2024, 08:18
PiRKPushed on Sep 23 2024, 08:18
Reviewer
Restricted Project
Differential Revision
D16795: refactor: Introduce PeerManagerImpl::RejectIncomingTxs
Parents
rABC3ca497c80697: [Automated] Update seeds
Branches
Unknown
Tags
Unknown