1
0

add blockchain.get_name method, update kivy gui

This commit is contained in:
ThomasV
2017-07-19 09:29:20 +02:00
parent 9576f8510d
commit b424a83a57
5 changed files with 22 additions and 37 deletions

View File

@@ -696,9 +696,6 @@ class Network(util.DaemonThread):
if b.catch_up == server:
b.catch_up = None
def get_checkpoint(self):
return max(self.blockchains.keys())
def new_interface(self, server, socket):
# todo: get tip first, then decide which checkpoint to use.
self.add_recent_server(server)
@@ -823,6 +820,7 @@ class Network(util.DaemonThread):
interface.bad_header = header
delta = interface.tip - height
next_height = max(0, interface.tip - 2 * delta)
elif interface.mode == 'binary':
if chain:
interface.good = height
@@ -1011,11 +1009,6 @@ class Network(util.DaemonThread):
out[k] = r
return out
def get_blockchain_name(self, blockchain):
checkpoint = self.get_checkpoint()
_hash = blockchain.get_hash(checkpoint)
return _hash.lstrip('00')[0:10]
def follow_chain(self, index):
blockchain = self.blockchains.get(index)
if blockchain: