2

I've been looking for months for the real mining code in the Bitcoin Core source code for the function/s that implement the incrementing of the nonce and hashing blocks for mining and never found anything useful. Can anyone Help me find it?

1 Answer 1

3

Most of the mining code was removed from Bitcoin Core as CPU mining gave way to GPU, FPGA and ASIC mining. The minimal amount of code that's left is intended for testing purposes, i.e. creating blocks on regtest. This code is in src/rpc/mining.cpp, and the function that handles incrementing the nonce is GenerateBlock.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.