-
Notifications
You must be signed in to change notification settings - Fork 51
Do not prevote to the block with irrelevant generation time #1512
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
Do not prevote to the block with irrelevant generation time #1512
Conversation
899444d
to
210842b
Compare
} else { | ||
None | ||
} | ||
TwoThirdsMajority::Lock(locked_view, block_hash) if locked_view == &self.view => { |
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.
It seems that it's the same with the previous code. Is it?
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.
Yes, It's the pre-commit step. Do I need to separate it to another commit or just revert it ?
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.
Why do you change it if it doesn't change the behavior?
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.
At first I was changing the pre-commit step and it helps to introduce checking block generation time and rejecting if irrelevant. After I had reverted it, I thought it still helps because it simplifies the routine. But it's meaningless in the sense that it doesn't change the behavior.
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.
And it makes code fragile when changing because you used the underscore arm.
When someone adds a new enumerator, the compiler knows where to fix it in the original code, but it doesn't know in this code.
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.
Ah, I understand. I couldn't think about that.
9205a94
to
a72d782
Compare
I made a English review request to @ScarletBlue on the |
a72d782
to
2ffd6da
Compare
2ffd6da
to
0ab67a6
Compare
@HoOngEe please resolve the conflicts |
If the proposal generation time is 30 seconds or more before from now or if 5 seconds or more later from now, the block generation time is now considered irrelevant.
3c769e0
to
559fe91
Compare
559fe91
to
ae6659a
Compare
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.
LGTM
If the proposal generation time is 30 seconds or more before from now or
if 5 seconds or more later from now, the block generation time is now considered irrelevant.
It closes #1505