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
Check if a processed orphan is in the main chain and update its parent accordingly #1527
base: master
Are you sure you want to change the base?
Check if a processed orphan is in the main chain and update its parent accordingly #1527
Conversation
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.
Looks good!
@jcvernaleo (as per #1530)
|
@someone235 can you add a description here? |
I updated the description. I hope it's clear |
Cool - will test this out tomorrow |
Hey - one more thing. Looks like you'll have to rebase or force push so tests pass |
a2a7b32
to
4496974
Compare
Rebased |
Pull Request Test Coverage Report for Build 413871199
💛 - Coveralls |
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.
Seems good from the look of it. I think it's also interesting to use fullblocktests and write a regression test since this PR touches consensus-critical code.
TBH I probably won't have time for this anytime soon, so you can add the test if you want. |
This PR fixes the situation where a new block is first not considered in the main chain, but then after processing orphans that depend on it the block is now on the heaviest chain, but ProcessBlock still mistakenly returns that it's not in the main chain.