1
0

Improved in network callbacks:

* Pass arguments
 * Don't redraw history when a tx is verified.
 * Fix new tx notifications.
This commit is contained in:
ThomasV
2015-08-16 11:35:39 +02:00
parent 438bc94dce
commit bfae04e6f0
6 changed files with 73 additions and 57 deletions

View File

@@ -126,16 +126,14 @@ class WalletSynchronizer():
except Exception:
self.print_msg("cannot deserialize transaction, skipping", tx_hash)
return
self.wallet.receive_tx_callback(tx_hash, tx, tx_height)
self.requested_tx.remove((tx_hash, tx_height))
self.print_error("received tx:", tx_hash, len(tx.raw))
# callbacks
self.network.trigger_callback('new_transaction', (tx,))
if not self.requested_tx:
self.network.trigger_callback('updated')
# Updated gets called too many times from other places as
# well; if we used that signal we get the notification
# three times
self.network.trigger_callback("new_transaction")
def request_missing_txs(self, hist):
# "hist" is a list of [tx_hash, tx_height] lists