Small fixes
This commit is contained in:
parent
6ebd2cc0cc
commit
8c4acdda19
|
@ -390,11 +390,11 @@ class MyForm(QtGui.QMainWindow):
|
|||
_translate(
|
||||
"MainWindow", "Copy destination address to clipboard"),
|
||||
self.on_action_SentClipboard)
|
||||
self.actionCancelPoW = self.ui.sentContextMenuToolbar.addAction(
|
||||
_translate(
|
||||
self.actionCancelPoW = self.ui.sentContextMenuToolbar.addAction(
|
||||
_translate(
|
||||
"MainWindow", "Cancel sending"), self.on_action_CancelPoW)
|
||||
self.actionContinuePoW = self.ui.sentContextMenuToolbar.addAction(
|
||||
_translate(
|
||||
self.actionContinuePoW = self.ui.sentContextMenuToolbar.addAction(
|
||||
_translate(
|
||||
"MainWindow", "Continue sending"), self.on_action_ContinuePoW)
|
||||
self.actionForceSend = self.ui.sentContextMenuToolbar.addAction(
|
||||
_translate(
|
||||
|
|
|
@ -65,7 +65,7 @@ def _doFastPoW(target, initialHash, cancellable):
|
|||
while True:
|
||||
time.sleep(10) # Don't let this thread return here; it will return nothing and cause an exception in bitmessagemain.py
|
||||
return
|
||||
if (shared.PoWQueue.empty() == True) and cancellable: #If the PoW is cancellable it can be interrupted
|
||||
if (shared.PoWQueue.empty() == True) and cancellable: #If the PoW is cancellable it can be interrupted
|
||||
pool.terminate()
|
||||
pool.join() #Wait for the workers to exit...
|
||||
return [-1, -1] #Special value for differentiation
|
||||
|
@ -74,12 +74,13 @@ def _doFastPoW(target, initialHash, cancellable):
|
|||
result = result[i].get()
|
||||
pool.terminate()
|
||||
pool.join() #Wait for the workers to exit...
|
||||
if cancellable: shared.PoWQueue.get() #If the PoW is cancellable we need to communicate its end to the UI
|
||||
return result[0], result[1]
|
||||
if cancellable: shared.PoWQueue.get() #If the PoW is cancellable we need to communicate its end to the UI
|
||||
return result[0], result[1]
|
||||
time.sleep(0.2)
|
||||
|
||||
def run(target, initialHash, cancellable):
|
||||
import time
|
||||
|
||||
#Only message PoW calculations are cancellable, Key requests are not.
|
||||
if cancellable:
|
||||
#If the PoW is cancellable we need to communicate its beginning to the UI
|
||||
|
|
Reference in New Issue
Block a user