Reverted the code that tried to randomise starting PoW position.
The problem wasn't caused by the starting position but by an int being interpreted as a string. Fixed in upstream and merged.
This commit is contained in:
parent
9d7bec58d1
commit
c61e41a356
|
@ -43,19 +43,14 @@ def do_opencl_pow(hash, target):
|
||||||
kernel.set_arg(1, dest_buf)
|
kernel.set_arg(1, dest_buf)
|
||||||
|
|
||||||
start = time.time()
|
start = time.time()
|
||||||
#startpos = random.getrandbits(32) << 32 | random.getrandbits(32)
|
|
||||||
#startpos = random.getrandbits(32)
|
|
||||||
startpos = 0
|
|
||||||
progress = 0
|
progress = 0
|
||||||
globamt = worksize*2000
|
globamt = worksize*2000
|
||||||
|
|
||||||
while output[0][0] == 0:
|
while output[0][0] == 0:
|
||||||
kernel.set_arg(2, pack("<Q", startpos))
|
kernel.set_arg(2, pack("<Q", progress))
|
||||||
cl.enqueue_nd_range_kernel(queue, kernel, (globamt,), (worksize,))
|
cl.enqueue_nd_range_kernel(queue, kernel, (globamt,), (worksize,))
|
||||||
cl.enqueue_read_buffer(queue, dest_buf, output)
|
cl.enqueue_read_buffer(queue, dest_buf, output)
|
||||||
queue.finish()
|
queue.finish()
|
||||||
#startpos == (globamt + startpos) & 0xFFFFFFFFFFFFFFFF
|
|
||||||
startpos += globamt
|
|
||||||
progress += globamt
|
progress += globamt
|
||||||
sofar = time.time() - start
|
sofar = time.time() - start
|
||||||
print sofar, progress / sofar, "hashes/sec"
|
print sofar, progress / sofar, "hashes/sec"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user