-
Notifications
You must be signed in to change notification settings - Fork 267
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
Remove validationPeriodIsOngoing method #2903
base: use_enum_fed_change_functions_for_voting
Are you sure you want to change the base?
Remove validationPeriodIsOngoing method #2903
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Manifest Files |
@@ -1079,13 +1079,12 @@ private void allowFederationElectionAgain() { | |||
} | |||
|
|||
private boolean isSvpOngoing() { |
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.
If you want to make it more functional:
private boolean isSvpOngoing() {
return federationSupport
.getProposedFederation()
.map(proposedFederation ->
rskExecutionBlock.getNumber() <
proposedFederation.getCreationBlockNumber() +
bridgeConstants.getFederationConstants().getValidationPeriodDurationInBlocks()
)
.orElse(false);
}
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.
Nice!
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.
very nice! Updated
@@ -1079,13 +1079,12 @@ private void allowFederationElectionAgain() { | |||
} | |||
|
|||
private boolean isSvpOngoing() { |
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.
Nice!
Quality Gate passedIssues Measures |
validationPeriodIsOngoing
andisSvpOngoing
were very similar, so no need to have them both.