Include prototyping steps #1

Merged
foefl merged 15 commits from native_hashing into main 2025-12-16 12:50:07 +00:00
2 changed files with 299 additions and 465 deletions
Showing only changes of commit 56be501a79 - Show all commits

File diff suppressed because it is too large Load Diff

View File

@ -269,24 +269,8 @@ cdef class PyBlock:
size_t digest_size
bint nonce_found = False
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)
# 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:
for nonce in range(max_nonce):