Page MenuHomePhabricator

Reduce spurious messages during headers sync
ClosedPublic

Authored by PiRK on Jan 15 2024, 13:50.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC08d9733c6a7b: Reduce spurious messages during headers sync
Summary

Delay sending SENDHEADERS (BIP 130) message until we know our peer's best
header's chain has more than nMinimumChainWork. This reduces inadvertent
headers messages received during initial headers sync due to block
announcements, which throw off our sync algorithm.

This is a partial backport of core#25717
https://github.com/bitcoin/bitcoin/pull/25717/commits/83c6a0c5249c4ecbd11f7828c84a50fb473faba3

Depends on D15130

Test Plan

ninja all check-all

Run header sync on mainnet and testnet

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable