-
Notifications
You must be signed in to change notification settings - Fork 291
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
Block validation rules impossible error paths refactor #1182
Comments
See the comments on PR #1306 which attempted to remove some of these for more details, however, an important takeaway is that these comments which were in the tests are not necessarily accurate. A full analysis of each case needs to be done rather than assuming they are correct. |
Having another go at this. |
I have started to work on this last few days ago.
…On Thu, Jul 9, 2020 at 1:21 AM Donald Adu-Poku ***@***.***> wrote:
Having another go at this.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1182 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEOKU7JWADUYSVZ6L32RZFTR2ULSDANCNFSM4E6AAX3Q>
.
|
@AnNiran alright, I'll post my findings to start the discussion on what error codes should stay or get removed, will leave any removals to you. @davecgh please assert the following when you can, thanks.
|
@dnldd I started to analyze the errors and the stake logic more thoroughly a week ago and understood parts of what you are saying. Thank you for sharing this, it is helpful for me to match with someone else's findings. I am starting with working with the code and I am much slower than rest of the people, so it takes me longer to realize some of the aspects. |
Apologies for not being active on this issue; I have managed to find time to work on it now and in the future on others. |
PRs #1060, #1095, and #1141 resolved issue #1030 by porting all of the block validation consensus rule tests which previously were in the
blockchain
package test function namedTestBlockValidationRules
to the newerfullblocktests
framework which programmatically generates a fully valid chain on the fly and only munges the blocks to cause a very specific condition to be tested while ensuring the block is otherwise entirely valid.However, the
TestBlockValidationRules
function also contained several comments regarding error paths which are not possible to hit.I'm copying those comments here as ideally the code should be refactored to avoid having impossible to hit error code paths unless they are assertions.
The text was updated successfully, but these errors were encountered: