Interim fix for #391 cfund votingCycle increments#396
Merged
Conversation
…expired proposals
Member
|
ideally tests should be duplicated, with one of them launching the node with flag rejectversionbit=n to verify behaviour in pre-fork scenarios and the other verifying behaviour in post-fork scenarios |
Member
|
Isn't this change cosmetic only? Do we need to attach the change to the version bit change? |
aguycalled
approved these changes
Jan 29, 2019
Member
|
I've reviewed the code except for the tests, the code looks good for the most part. |
matt-auckland
approved these changes
Feb 7, 2019
Member
matt-auckland
left a comment
There was a problem hiding this comment.
Approved pending Travis build
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 PR is an interim fix for #391.
Uses aguycalled@9c1db64 to stop votingCycles being recalculated if there is a reorg. Adds a test to check this, which fails in the current master branch but passes with this patch.
Expired proposals and payment requests will still increment +1 over their maximum number of cycles as per the existing cfund design. But the string output from toJson() will be limited to the max number of cycles.
Also stops votes from being counted in the votingCycle
nCyclesPaymentRequestVoting + 1andnCyclesProposalVoting + 1.