generated from dopt-python/py311-cython
remove prange
This commit is contained in:
parent
e5ca60919e
commit
56be501a79
File diff suppressed because it is too large
Load Diff
@ -269,24 +269,8 @@ cdef class PyBlock:
|
|||||||
size_t digest_size
|
size_t digest_size
|
||||||
bint nonce_found = False
|
bint nonce_found = False
|
||||||
int nonce, nonce_solution = 0
|
int nonce, nonce_solution = 0
|
||||||
bint *p_nonce_found = &nonce_found
|
|
||||||
int *p_nonce_solution = &nonce_solution
|
|
||||||
|
|
||||||
serial_buf = self.bytes_serialize_c(&serialize_size)
|
serial_buf = self.bytes_serialize_c(&serialize_size)
|
||||||
|
|
||||||
# for nonce in prange(max_nonce, nogil=True, schedule="static", num_threads=16):
|
|
||||||
# if p_nonce_found[0]:
|
|
||||||
# break
|
|
||||||
|
|
||||||
# serialize_uint64(serial_buf + NONCE_OFFSET, <uint64_t>nonce)
|
|
||||||
# digest = self.digest(serial_buf, serialize_size, &digest_size)
|
|
||||||
|
|
||||||
# if has_leading_zero_bits(digest, difficulty):
|
|
||||||
# p_nonce_found[0] = True
|
|
||||||
# p_nonce_solution[0] = nonce
|
|
||||||
# break
|
|
||||||
|
|
||||||
# free(digest)
|
|
||||||
|
|
||||||
with nogil:
|
with nogil:
|
||||||
for nonce in range(max_nonce):
|
for nonce in range(max_nonce):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user