HomePhabricator

p2p: Track orphans by who provided them

Description

p2p: Track orphans by who provided them

Summary:

We currently process orphans by assigning them to the peer that provided a missing parent; instead assign them to the peer that provided the orphan in the first place. This prevents a peer from being able to marginally delay another peer's transactions and also simplifies the internal API slightly. Because we're now associating orphan processing with the peer that provided the orphan originally, we no longer process orphans immediately after receiving the parent, but defer until a future call to ProcessMessage.

Backport of core#26551.

Depends on D16235.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Subscribers: PiRK

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

Details

Provenance
Anthony Towns <aj@erisian.com.au>Authored on Mar 25 2021, 04:13
FabienCommitted on May 29 2024, 11:46
FabienPushed on May 29 2024, 11:46
Reviewer
Restricted Project
Differential Revision
D16236: p2p: Track orphans by who provided them
Parents
rABC5f3292a2d196: scripted-diff: rename and de-globalise g_cs_orphans
Branches
Unknown
Tags
Unknown