-
Notifications
You must be signed in to change notification settings - Fork 1
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
403 process catchup request #722
Conversation
…hold when sending catch up request. Extracted handling and sending of catch up requests to GrandpaSetState.java
|
||
private List<Authority> authorities; | ||
private BigInteger disabledAuthority; | ||
private BigInteger setId; | ||
|
||
private final BlockState blockState; | ||
private final RoundCache roundCache; | ||
private GrandpaRound lastFinalizedRound; |
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.
Wouldn't it be easier to store BigInteger lastFinalizedRoundNumber instead of GrandpaRound lastFinalizedRound and then call lastFinalizedRound.getRoundNumber()?
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.
The lastFinalizedRound field should also be updated; I suggest setting it right after attemptToFinalizeAt() returns true or directly in the method itself.
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.
We arranged that lastFinalizedRound will be taken from db
…ing to catch up request.
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.
I don't think these are needed here. We can fully move the logic to the GrandpaSetState
. The methods here do not bring any extra logic in the process.
@@ -10,7 +11,8 @@ | |||
@Data | |||
@AllArgsConstructor | |||
@NoArgsConstructor | |||
public class CatchUpMessage { | |||
@Builder(toBuilder = true) |
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.
Why do we need the toBuilder
?
@@ -9,6 +10,7 @@ | |||
@Data | |||
@AllArgsConstructor | |||
@NoArgsConstructor | |||
@Builder(toBuilder = true) |
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.
Here as well.
# Conflicts: # src/main/java/com/limechain/network/protocol/grandpa/GrandpaService.java
…e methods from WarpSyncState.java to GrandpaSetState.java.
….java and CatchUpReqMessage.java
Quality Gate passedIssues Measures |
Description
Fixes #403 >