mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-01 10:39:41 +01:00
Adding a context parameter ensures that these methods are run in their own thread and don't block other calls. They were missing for: - createNewBlock() - checkBlock() The missing parameters were first pointed out by plebhash in https://github.com/bitcoin/bitcoin/issues/33575#issuecomment-3383290115 and adding them should prevent possible performance problems and lockups, especially with #34184 which can make the createNewBlock method block for a long time before returning. It would be straightforward to make this change in a backward compatible way (https://github.com/bitcoin/bitcoin/pull/34184#discussion_r2770232149) but nice to not need to go through the trouble. Warning: This is an intermediate, review-only commit. Binaries built from it should not be distributed or used to connect to other clients or servers. It makes incompatible changes to the `mining.capnp` schema without updating the `Init.makeMining` version, causing binaries to advertise support for a schema they do not actually implement. Mixed versions may therefore exchange garbage requests/responses instead of producing clear errors. The final commit in this series bumps the mining interface number to ensure mismatches are detected. git-bisect-skip: yes Co-authored-by: Ryan Ofsky <ryan@ofsky.org>