1
0

disconnect from servers on exception

This commit is contained in:
SomberNight
2018-08-31 16:46:03 +02:00
parent 3f0d79f07d
commit 14a032a0b1
2 changed files with 12 additions and 8 deletions

View File

@@ -244,6 +244,8 @@ class BlockHeaderInterface(PrintError):
could_connect, num_headers = await self.conn.request_chunk(self.height, next_height)
self.tip = max(self.height + num_headers, self.tip)
if not could_connect:
if self.height <= self.iface.network.max_checkpoint():
raise Exception('server chain conflicts with checkpoints or genesis')
last = await self.step()
self.tip = max(self.height, self.tip)
continue