Page MenuHomePhabricator

[P2P] Timeout for headers sync
ClosedPublic

Authored by deadalnix on Sep 11 2018, 11:13.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
corepr10345
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3305
Build 4694: Bitcoin ABC Buildbot (legacy)
Build 4693: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Sep 16 2018, 22:20
This revision was automatically updated to reflect the committed changes.