From 8774f1a193129ca6af503e75cb6ffced3ffefe5a Mon Sep 17 00:00:00 2001 From: thomasv Date: Mon, 2 Sep 2013 13:41:31 +0200 Subject: [PATCH] fix: synchronize generated duplicated addresses --- gui/installwizard.py | 7 +++---- lib/wallet.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/gui/installwizard.py b/gui/installwizard.py index 691e1284f..86d181576 100644 --- a/gui/installwizard.py +++ b/gui/installwizard.py @@ -179,14 +179,13 @@ class InstallWizard(QDialog): #self.interface.start(wait = False) - # start wallet threads - wallet.start_threads(self.interface, self.blockchain) - - # generate the first addresses, in case we are offline if s is None or a == 'create': wallet.synchronize() + # start wallet threads + wallet.start_threads(self.interface, self.blockchain) + if a == 'restore' and s is not None: try: diff --git a/lib/wallet.py b/lib/wallet.py index 7c9c92e52..773aed555 100644 --- a/lib/wallet.py +++ b/lib/wallet.py @@ -665,7 +665,7 @@ class Wallet: if tx_height == 0: tx_age = 0 else: - tx_age = self.verifier.height - tx_height + 1 + tx_age = self.verifier.blockchain.height - tx_height + 1 if tx_age > age: age = tx_age return age > 2