HomePhabricator

[P2P] Timeout for headers sync

Description

[P2P] Timeout for headers sync

Summary:
Add timeout for headers sync

At startup, we choose one peer to serve us the headers chain, until
our best header is close to caught up. Disconnect this peer if more
than 15 minutes + 1ms/expected_header passes and our best header
is still more than 1 day away from current time.

This is a backport of core PR10345

Part of it was made redundant after D1130

Test Plan:

make check

Reviewers: #bitcoin_abc, schancel

Reviewed By: #bitcoin_abc, schancel

Subscribers: teamcity

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

Details

Provenance
Suhas Daftuar <sdaftuar@chaincode.com>Authored on May 5 2017, 18:37
deadalnixCommitted on Sep 17 2018, 07:42
deadalnixPushed on Sep 17 2018, 07:42
Reviewer
Restricted Project
Differential Revision
D1763: [P2P] Timeout for headers sync
Parents
rABC4ae37d54ba3d: Increase INVENTORY_BROADCAST_MAX to 1170 (based on 32MB max message size). This…
Branches
Unknown
Tags
Unknown

Event Timeline