-
Notifications
You must be signed in to change notification settings - Fork 33
Fix for incorrect equihash and cryptonight block headers response #133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…of boost::bind()" This reverts commit 2669119.
…ihash and cryptonight blocks when "getheaders" are requested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a critical bug where Bitmark nodes return incorrect block headers for equihash and cryptonight blocks when "getheaders" requests are processed. It also reverts a previous commit that broke the build by incorrectly using std::placeholders with boost::bind.
Key changes:
- Adds missing field assignments (nNonce256, nSolution, hashReserved) to block header construction methods
- Ensures equihash and cryptonight block headers are correctly populated when loaded from disk
- Reverts boost::bind placeholder changes from
std::placeholders::_Nto_N(global namespace placeholders)
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/txdb.cpp | Adds missing assignments of nNonce256, nSolution, and hashReserved fields when loading block index from disk; fixes whitespace |
| src/core.h | Updates CBlock::GetBlockHeader() and CBlockIndex::GetBlockHeader() to include nNonce256, nSolution, and hashReserved fields |
| src/qt/walletmodel.cpp | Reverts boost::bind placeholders from std::placeholders to global namespace (_1, _2, etc.) |
| src/qt/splashscreen.cpp | Reverts boost::bind placeholders from std::placeholders to global namespace |
| src/qt/clientmodel.cpp | Reverts boost::bind placeholders from std::placeholders to global namespace |
| src/qt/bitmarkgui.cpp | Reverts boost::bind placeholders from std::placeholders to global namespace |
| src/main.cpp | Reverts boost::bind placeholders from std::placeholders to global namespace |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| block.nNonce256 = nNonce256; | ||
| block.nSolution = nSolution; | ||
| block.hashReserved = hashReserved; |
Copilot
AI
Jan 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent whitespace: These lines use tabs while the surrounding code uses spaces for indentation. The whitespace should match the existing code style.
| block.nNonce256 = nNonce256; | |
| block.nSolution = nSolution; | |
| block.hashReserved = hashReserved; | |
| block.nNonce256 = nNonce256; | |
| block.nSolution = nSolution; | |
| block.hashReserved = hashReserved; |
| block.nNonce256 = nNonce256; | ||
| block.nSolution = nSolution; | ||
| block.hashReserved = hashReserved; |
Copilot
AI
Jan 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent whitespace: These lines use tabs while the surrounding code uses spaces for indentation. The whitespace should match the existing code style.
| pindexNew->nNonce256 = diskindex.nNonce256; | ||
| pindexNew->nSolution = diskindex.nSolution; | ||
| pindexNew->hashReserved = diskindex.hashReserved; |
Copilot
AI
Jan 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent whitespace: These lines use tabs while the surrounding code uses spaces for indentation. The whitespace should match the existing code style, which appears to use spaces based on the surrounding lines.
This PR: