I currently work on upgrading an old cryptocurrency (fork of an old bitcoin version) to the latest of Bitcoin that includes a lot of tests.

I currently am stuck with making this test succeed: https://github.com/bitcoin/bitcoin/blob/2971fd030f6e20ff5279bd86ba18acc5e5ed1ce9/src/test/miner_tests.cpp#L249

I believe this issue is because of the hardcoded data in blockinfo (see: https://github.com/bitcoin/bitcoin/blob/2971fd030f6e20ff5279bd86ba18acc5e5ed1ce9/src/test/miner_tests.cpp#L54)

How do I get blockinfo to update with the right nonce and extraNonce?

I tried different things, including trying to increase the pblock->nNonce by 1 until I hit the right PoW target, but for some reason pblock->GetPoWHash() didn't change after that.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.