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