1
0

add checkpoint dialog to the kivy gui

This commit is contained in:
ThomasV
2017-03-27 12:48:10 +02:00
parent e6560b8d7f
commit 2fcdd458b3
4 changed files with 124 additions and 6 deletions

View File

@@ -192,8 +192,7 @@ class NetworkChoiceLayout(object):
n = len(network.get_interfaces())
status = _("Connected to %d nodes.")%n if n else _("Not connected")
height_str = "%d "%(network.get_local_height()) + _("blocks")
self.checkpoint_height = self.config.get('checkpoint_height', 0)
self.checkpoint_value = self.config.get('checkpoint_value', bitcoin.GENESIS)
self.checkpoint_height, self.checkpoint_value = network.blockchain.get_checkpoint()
self.cph_label = QLabel(_('Height'))
self.cph = QLineEdit("%d"%self.checkpoint_height)
self.cph.setFixedWidth(80)
@@ -337,8 +336,7 @@ class NetworkChoiceLayout(object):
auto_connect = self.autoconnect_cb.isChecked()
self.network.set_parameters(host, port, protocol, proxy, auto_connect)
self.config.set_key('checkpoint_height', self.checkpoint_height)
self.config.set_key('checkpoint_value', self.checkpoint_value)
self.network.blockchain.set_checkpoint(self.checkpoint_height, self.checkpoint_value)
def suggest_proxy(self, found_proxy):
self.tor_proxy = found_proxy