1
0

network triggers: 'verified' notification now includes wallet

this is a performance optimisation.

measurements using a large wallet with 11k txns:
syncing XPUB for the first time takes 10 seconds. leaving window open, and
syncing same XPUB again in new window takes 30 seconds. in third window,
it takes ~50 seconds. then ~70s. presumably scaling linearly.
this is due to the history_list.update_item call being CPU-heavy.
now all of them take 10 seconds.
This commit is contained in:
SomberNight
2018-09-18 01:40:34 +02:00
parent 24ec7ce6b8
commit 11bf084a1f
2 changed files with 4 additions and 2 deletions

View File

@@ -593,7 +593,7 @@ class AddressSynchronizer(PrintError):
self.unverified_tx.pop(tx_hash, None)
self.verified_tx[tx_hash] = info
tx_mined_status = self.get_tx_height(tx_hash)
self.network.trigger_callback('verified', tx_hash, tx_mined_status)
self.network.trigger_callback('verified', self, tx_hash, tx_mined_status)
def get_unverified_txs(self):
'''Returns a map from tx hash to transaction height'''