Browse Source

interface: also trigger 'blockchain_updated' during initial sync

In fact, semantically it might be more correct to only trigger 'blockchain_updated' and not 'network_updated' here...
Anyway, 'blockchain_updated' should be triggered whenever the Blockchain object gets longer (or changes otherwise).

In particular, in qml, the NetworkOverview only updates the displayed height on 'blockchain_updated'.
master
SomberNight 2 years ago
parent
commit
27f09c1f9f
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 1
      electrum/interface.py

1
electrum/interface.py

@ -801,6 +801,7 @@ class Interface(Logger):
raise GracefulDisconnect('server chain conflicts with checkpoints or genesis') raise GracefulDisconnect('server chain conflicts with checkpoints or genesis')
last, height = await self.step(height) last, height = await self.step(height)
continue continue
util.trigger_callback('blockchain_updated')
util.trigger_callback('network_updated') util.trigger_callback('network_updated')
height = (height // 2016 * 2016) + num_headers height = (height // 2016 * 2016) + num_headers
assert height <= next_height+1, (height, self.tip) assert height <= next_height+1, (height, self.tip)

Loading…
Cancel
Save