fix: reorgs
This commit is contained in:
parent
63f14f6ab2
commit
1ee70f798e
|
@ -829,14 +829,11 @@ class Network(util.DaemonThread):
|
|||
next_height = (interface.bad + interface.good) // 2
|
||||
elif interface.mode == 'default':
|
||||
if can_connect:
|
||||
if height > self.get_local_height():
|
||||
self.blockchain.save_header(header)
|
||||
self.notify('updated')
|
||||
if height < interface.tip:
|
||||
next_height = height + 1
|
||||
else:
|
||||
next_height = None
|
||||
next_height = height + 1 if height < interface.tip else None
|
||||
else:
|
||||
interface.print_error("cannot connect %d"% height)
|
||||
interface.mode = 'backward'
|
||||
interface.bad = height
|
||||
next_height = height - 1
|
||||
|
|
Loading…
Reference in New Issue