HomePhabricator

[net processing] Only send a getheaders for one block in an INV

Description

[net processing] Only send a getheaders for one block in an INV

Summary:
Headers-first is the primary method of announcement on the network. If a
node fell back sending blocks by inv, it's probably for a re-org. The
final block hash provided should be the highest, so send a getheaders
and then fetch the blocks we need to catch up.

This is a backport of Core PR18962

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
John Newbery <john@johnnewbery.com>Authored on Feb 1 2021, 08:40
PiRKCommitted on Feb 1 2021, 08:40
abc-botPushed on Feb 1 2021, 08:46
Reviewer
Restricted Project
Differential Revision
D9113: [net processing] Only send a getheaders for one block in an INV
Parents
rABC3152367fe3e8: [Cashtab] replace legacy DUST param with constant
Branches
Unknown
Tags
Unknown