wizard: start wallet threads
This commit is contained in:
parent
046ec58d24
commit
7ba686e16f
|
@ -2221,7 +2221,7 @@ class ElectrumGui:
|
||||||
storage = WalletStorage(self.config)
|
storage = WalletStorage(self.config)
|
||||||
if not storage.file_exists:
|
if not storage.file_exists:
|
||||||
import installwizard
|
import installwizard
|
||||||
wizard = installwizard.InstallWizard(self.config, self.interface, storage)
|
wizard = installwizard.InstallWizard(self.config, self.interface, self.blockchain, storage)
|
||||||
wallet = wizard.run()
|
wallet = wizard.run()
|
||||||
if not wallet:
|
if not wallet:
|
||||||
exit()
|
exit()
|
||||||
|
|
|
@ -3,7 +3,7 @@ from PyQt4.QtCore import *
|
||||||
import PyQt4.QtCore as QtCore
|
import PyQt4.QtCore as QtCore
|
||||||
from i18n import _
|
from i18n import _
|
||||||
|
|
||||||
from electrum import Wallet, mnemonic, WalletVerifier, WalletSynchronizer
|
from electrum import Wallet, mnemonic
|
||||||
|
|
||||||
from seed_dialog import SeedDialog
|
from seed_dialog import SeedDialog
|
||||||
from network_dialog import NetworkDialog
|
from network_dialog import NetworkDialog
|
||||||
|
@ -14,10 +14,11 @@ import sys
|
||||||
|
|
||||||
class InstallWizard(QDialog):
|
class InstallWizard(QDialog):
|
||||||
|
|
||||||
def __init__(self, config, interface, storage):
|
def __init__(self, config, interface, blockchain, storage):
|
||||||
QDialog.__init__(self)
|
QDialog.__init__(self)
|
||||||
self.config = config
|
self.config = config
|
||||||
self.interface = interface
|
self.interface = interface
|
||||||
|
self.blockchain = blockchain
|
||||||
self.storage = storage
|
self.storage = storage
|
||||||
|
|
||||||
|
|
||||||
|
@ -148,7 +149,6 @@ class InstallWizard(QDialog):
|
||||||
if not a: exit()
|
if not a: exit()
|
||||||
|
|
||||||
wallet = Wallet(self.storage)
|
wallet = Wallet(self.storage)
|
||||||
wallet.interface = self.interface
|
|
||||||
|
|
||||||
if a =='create':
|
if a =='create':
|
||||||
wallet.init_seed(None)
|
wallet.init_seed(None)
|
||||||
|
@ -180,11 +180,7 @@ class InstallWizard(QDialog):
|
||||||
#self.interface.start(wait = False)
|
#self.interface.start(wait = False)
|
||||||
|
|
||||||
# start wallet threads
|
# start wallet threads
|
||||||
verifier = WalletVerifier(self.interface, self.storage)
|
wallet.start_threads(self.interface, self.blockchain)
|
||||||
verifier.start()
|
|
||||||
wallet.set_verifier(verifier)
|
|
||||||
synchronizer = WalletSynchronizer(wallet)
|
|
||||||
synchronizer.start()
|
|
||||||
|
|
||||||
|
|
||||||
# generate the first addresses, in case we are offline
|
# generate the first addresses, in case we are offline
|
||||||
|
|
|
@ -125,7 +125,7 @@ class BlockchainVerifier(threading.Thread):
|
||||||
requested_headers.remove(result.get('block_height'))
|
requested_headers.remove(result.get('block_height'))
|
||||||
else:
|
else:
|
||||||
self.height = result.get('block_height')
|
self.height = result.get('block_height')
|
||||||
self.interface.poke('synchronizer')
|
## fixme # self.interface.poke('synchronizer')
|
||||||
|
|
||||||
self.pending_headers.sort(key=lambda x: x.get('block_height'))
|
self.pending_headers.sort(key=lambda x: x.get('block_height'))
|
||||||
# print "pending headers", map(lambda x: x.get('block_height'), self.pending_headers)
|
# print "pending headers", map(lambda x: x.get('block_height'), self.pending_headers)
|
||||||
|
|
Loading…
Reference in New Issue