From: ThomasV Date: Sun, 15 Sep 2013 07:03:45 +0000 (+0200) Subject: rename menu: create tx X-Git-Url: https://git.novaco.in/?a=commitdiff_plain;h=41878dc5e0c3e126854c9869410f2a48338cc496;p=electrum-nvc.git rename menu: create tx --- diff --git a/gui/gui_classic/main_window.py b/gui/gui_classic/main_window.py index e50f14f..57b3944 100644 --- a/gui/gui_classic/main_window.py +++ b/gui/gui_classic/main_window.py @@ -362,12 +362,12 @@ class ElectrumWindow(QMainWindow): raw_transaction_text = raw_transaction_menu.addAction(_("&From text")) raw_transaction_text.triggered.connect(self.do_process_from_text) - csv_transaction_menu = wallet_menu.addMenu(_("&Load CSV transaction")) + csv_transaction_menu = wallet_menu.addMenu(_("&Create transaction")) - csv_transaction_file = csv_transaction_menu.addAction(_("&From file")) + csv_transaction_file = csv_transaction_menu.addAction(_("&From CSV file")) csv_transaction_file.triggered.connect(self.do_process_from_csv_file) - csv_transaction_text = csv_transaction_menu.addAction(_("&From text")) + csv_transaction_text = csv_transaction_menu.addAction(_("&From CSV text")) csv_transaction_text.triggered.connect(self.do_process_from_csv_text) wallet_menu.addSeparator() diff --git a/lib/blockchain.py b/lib/blockchain.py index d0563d6..625c78f 100644 --- a/lib/blockchain.py +++ b/lib/blockchain.py @@ -64,10 +64,9 @@ class Blockchain(threading.Thread): if not result: continue - i, result = result - if not result: continue + i, header = result + if not header: continue - header = result.get('result') height = header.get('block_height') self.servers_height[i.server] = height diff --git a/lib/network.py b/lib/network.py index fba2937..81b476e 100644 --- a/lib/network.py +++ b/lib/network.py @@ -50,6 +50,7 @@ class Network(threading.Thread): self.servers = [] self.banner = '' self.interface = None + self.heights = {} def register_callback(self, event, callback): @@ -156,7 +157,10 @@ class Network(threading.Thread): else: self.trigger_callback('disconnected') - def on_header(self, i, result): + def on_header(self, i, r): + result = r.get('result') + if not result: return + self.heights[i.server] = result.get('block_height') self.blockchain.queue.put((i,result)) def on_peers(self, i, r):