HomePhabricator

Always drop the least preferred HB peer when adding a new one.
ca8549d2bd32Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Always drop the least preferred HB peer when adding a new one.

When a BIP152 HB-mode peer is in the least preferred position and
disconnects, they will not be by ForNode on the next loop. They
will continue to sit in that position and prevent deactivating
HB mode for peers that are still connected.

There is no reason for them to stay in the list if already gone,
so drop the first element unconditionally if there are too many.

Fixes issue #9163.

Details

Provenance
Gregory Maxwell <greg@xiph.org>Authored on Nov 22 2016, 02:50
schancelPushed on Jan 5 2018, 21:58
schancelPushed on Jan 5 2018, 21:39
schancelPushed on Jan 5 2018, 21:17
Parents
rSTAGING0c577f2638b7: Merge #8872: Remove block-request logic from INV message processing
Branches
Unknown
Tags
Unknown

Event Timeline

Gregory Maxwell <greg@xiph.org> committed rSTAGINGca8549d2bd32: Always drop the least preferred HB peer when adding a new one. (authored by Gregory Maxwell <greg@xiph.org>).Nov 22 2016, 02:54