mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-28 16:01:30 +00:00
network: avoid infinite loop if server headers conflict with checkpoints and server height is above max checkpoint
This commit is contained in:
parent
51ed8a998c
commit
9a8183f348
1 changed files with 3 additions and 0 deletions
|
@ -893,6 +893,9 @@ class Network(util.DaemonThread):
|
||||||
interface.bad_header = header
|
interface.bad_header = header
|
||||||
delta = interface.tip - height
|
delta = interface.tip - height
|
||||||
next_height = max(self.max_checkpoint(), interface.tip - 2 * delta)
|
next_height = max(self.max_checkpoint(), interface.tip - 2 * delta)
|
||||||
|
if height == next_height:
|
||||||
|
self.connection_down(interface.server)
|
||||||
|
next_height = None
|
||||||
|
|
||||||
elif interface.mode == 'binary':
|
elif interface.mode == 'binary':
|
||||||
if chain:
|
if chain:
|
||||||
|
|
Loading…
Add table
Reference in a new issue