From de805511fb10a048c7a4b08d095a5489117867fe Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Fri, 15 Feb 2013 15:23:34 -0500 Subject: [PATCH] Do pubkey POW directly after generating an address using random number generator --- bitmessagemain.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bitmessagemain.py b/bitmessagemain.py index dc9fa503..55b182ab 100644 --- a/bitmessagemain.py +++ b/bitmessagemain.py @@ -2409,6 +2409,7 @@ class singleWorker(QThread): print 'broadcasting inv with hash:', inventoryHash.encode('hex') printLock.release() broadcastToSendDataQueues((streamNumber, 'sendinv', inventoryHash)) + self.emit(SIGNAL("updateStatusBar(PyQt_PyObject)"),"") def sendBroadcast(self): sqlLock.acquire() @@ -2861,9 +2862,10 @@ class addressGenerator(QThread): with open(appdata + 'keys.dat', 'wb') as configfile: config.write(configfile) - self.emit(SIGNAL("updateStatusBar(PyQt_PyObject)"),'Done generating address') + self.emit(SIGNAL("updateStatusBar(PyQt_PyObject)"),'Done generating address. Doing work necessary to broadcast it.') self.emit(SIGNAL("writeNewAddressToTable(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"),self.label,address,str(self.streamNumber)) reloadMyAddressHashes() + workerQueue.put(('doPOWForMyV2Pubkey',address)) else: #There is something in the deterministicPassphrase variable thus we are going to do this deterministically. statusbar = 'Generating '+str(self.numberOfAddressesToMake) + ' new addresses.' @@ -3482,11 +3484,10 @@ class MyForm(QtGui.QMainWindow): QtCore.QObject.connect(self.singleCleanerThread, QtCore.SIGNAL("updateSentItemStatusByHash(PyQt_PyObject,PyQt_PyObject)"), self.updateSentItemStatusByHash) self.workerThread = singleWorker() - - #self.workerThread.setup(workerQueue) self.workerThread.start() QtCore.QObject.connect(self.workerThread, QtCore.SIGNAL("updateSentItemStatusByHash(PyQt_PyObject,PyQt_PyObject)"), self.updateSentItemStatusByHash) QtCore.QObject.connect(self.workerThread, QtCore.SIGNAL("updateSentItemStatusByAckdata(PyQt_PyObject,PyQt_PyObject)"), self.updateSentItemStatusByAckdata) + QtCore.QObject.connect(self.workerThread, QtCore.SIGNAL("updateStatusBar(PyQt_PyObject)"), self.updateStatusBar) def click_actionManageKeys(self): if 'darwin' in sys.platform or 'linux' in sys.platform: