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.
It seems that it's the same with the previous code. Is it?
There was a problem hiding this comment.
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.
Why do you change it if it doesn't change the behavior?
There was a problem hiding this comment.
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.
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.
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
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