def __init__(self, network, defaults, app):
self.network = network
self.defaults = defaults
self.pushing = False
self.app = app
super().__init__()
# endless loop for updating information displayed
def update_statistics():
self.ids.listening_interface_label.text = 'Listening interface: {}:{}'.format(bptc.ip, bptc.port)
self.ids.event_count_label.text = '{} events, {} confirmed'.format(len(self.hashgraph.lookup_table.keys()),
len(self.hashgraph.ordered_events))
self.ids.last_push_sent_label.text = 'Last push sent: {}'.format(self.network.last_push_sent)
self.ids.last_push_received_label.text = 'Last push received: {}'.format(self.network.last_push_received)
t = threading.Timer(1, update_statistics)
t.daemon = True
t.start()
update_statistics()
评论列表
文章目录