HomePhabricator

net: Remove forcerelay of rejected txs

Description

net: Remove forcerelay of rejected txs

Summary:

This removes the code that supposedly handled the forced relay of txs from a permissioned peer that were rejected from our mempool. The removal should be fine, because it is dead code for the following reasons:

  • While RelayTransaction enqueues the inv for all peers, the inv is never processed because it can not be found in the mempool.
  • Even if the peers we intended to send the inv to can somehow reply with a getdata to the never-received inv, they won't receive the tx as a reply because it was never added to the "relay memory" (mapRelay)

This feature was (intentionally or accidentally) removed in 4d8993b, which was released in Bitcoin Core 0.13.0. So all currently supported versions of Bitcoin Core ship without this feature. I am not aware of any complaints about this feature or actual documented use-cases. So instead of reviving an unneeded feature, just remove the dead code.

This is a backport of core#17985

Some comments were already updated on our side via D9325 and D9042.

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Jan 22 2020, 21:02
PiRKCommitted on Aug 30 2021, 08:38
PiRKPushed on Aug 30 2021, 08:38
Reviewer
Restricted Project
Differential Revision
D9831: net: Remove forcerelay of rejected txs
Parents
rABCd0c7f1c3fd6b: walletdb: Handle cursor internally
Branches
Unknown
Tags
Unknown