Require two consecutive successful productions when counting witnesses for LIB#2473
Open
theoreticalbts wants to merge 3 commits intodevelopfrom
Open
Require two consecutive successful productions when counting witnesses for LIB#2473theoreticalbts wants to merge 3 commits intodevelopfrom
theoreticalbts wants to merge 3 commits intodevelopfrom
Conversation
b02731c to
37c5186
Compare
Contributor
Author
37c5186 to
ff7b01f
Compare
mvandeberg
suggested changes
May 21, 2018
Contributor
mvandeberg
left a comment
There was a problem hiding this comment.
This PR does not change tests yet still passes them. Due to the nature of the changes, this means that irreversibility tests either a) do not exist, or b) are not sufficient to detect significant changes in our irreversibility algorithm. From my reading of the code, these changes look good, but I would feel much better if they were accompanied by tests. A hard requirement is the scenario described in the EOS issue to show that these changes solve that problem.
|
|
||
| w.total_missed++; | ||
| if( has_hardfork( STEEM_HARDFORK_0_14__278 ) ) | ||
| if( (_dgp.head_block_number - w.last_confirmed_block_num > STEEM_BLOCKS_PER_DAY) |
| // Also, this prevents initminer from having a large total_missed. | ||
| // | ||
|
|
||
| w.total_missed++; |
Contributor
There was a problem hiding this comment.
This should be wrapped in the if( witness_missed.owner != b.witness ) conditional to preserve existing behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This code implements the "Discount missing witnesses" solution for issue #2471.
PR #2472 is a dependency of this PR and should be merged before this PR.