You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can collapse these three checks to a single if statement with a conjunction (AND) of these three conditions, reordered any we like, and I like this ordering:
The idea behind this reordering is that, by deferring the hardfork check (involving an object lookup) until the last, we might well avoid it entirely if one of the other checks fails (the other two checks are both only integer arithmetic and reading fields from objects already available).
I'd really like to get rid of the witness_missed.owner != b.owner check, but I realized we cannot remove it, otherwise the network might be bricked if all of the witnesses miss enough blocks to get shut down, then start producing again.
The text was updated successfully, but these errors were encountered:
@abitmore raises the point that this patch might be "cruel" to some witnesses by increasing reported total_missed. For that reason, we've decided not to change the functionality.
I will therefore close this ticket and PR #2472, and remove this commit from PR #2473.
This code skips updating
total_missed
in casewitness_missed.owner == b.owner
. To fix the bug, transform from:to:
We can collapse these three checks to a single
if
statement with a conjunction (AND
) of these three conditions, reordered any we like, and I like this ordering:The idea behind this reordering is that, by deferring the hardfork check (involving an object lookup) until the last, we might well avoid it entirely if one of the other checks fails (the other two checks are both only integer arithmetic and reading fields from objects already available).
I'd really like to get rid of the
witness_missed.owner != b.owner
check, but I realized we cannot remove it, otherwise the network might be bricked if all of the witnesses miss enough blocks to get shut down, then start producing again.The text was updated successfully, but these errors were encountered: