PoW init reordering
- inited by the worker thread on its own init, instead of when the imports are being evaluated - also got rid of windows-style newlines in OpenCL PoW
This commit is contained in:
parent
58b47bc6de
commit
a48dff3bee
|
@ -42,6 +42,7 @@ class singleWorker(threading.Thread, StoppableThread):
|
|||
# QThread.__init__(self, parent)
|
||||
threading.Thread.__init__(self, name="singleWorker")
|
||||
self.initStop()
|
||||
proofofwork.init()
|
||||
|
||||
def stopThread(self):
|
||||
try:
|
||||
|
|
|
@ -100,7 +100,7 @@ def do_opencl_pow(hash, target):
|
|||
# logger.debug("Took %d tries.", progress)
|
||||
return output[0][0]
|
||||
|
||||
initCL()
|
||||
#initCL()
|
||||
|
||||
if __name__ == "__main__":
|
||||
target = 54227212183L
|
||||
|
|
|
@ -237,6 +237,9 @@ def resetPoW():
|
|||
# init
|
||||
def init():
|
||||
global bitmsglib, bso, bmpow
|
||||
|
||||
openclpow.initCL()
|
||||
|
||||
if "win32" == sys.platform:
|
||||
if ctypes.sizeof(ctypes.c_voidp) == 4:
|
||||
bitmsglib = 'bitmsghash32.dll'
|
||||
|
@ -286,7 +289,5 @@ def init():
|
|||
bmpow = None
|
||||
else:
|
||||
bmpow = None
|
||||
|
||||
init()
|
||||
if bmpow is None:
|
||||
if bmpow is None:
|
||||
buildCPoW()
|
||||
|
|
Loading…
Reference in New Issue
Block a user