Skip to content

Commit

Permalink
feat: Implement functionalities to update grandpa ghost and estimate.…
Browse files Browse the repository at this point in the history
… Set round as completable and finalize in some specific conditions.
  • Loading branch information
Zurcusa committed Feb 12, 2025
1 parent 5a8129d commit 87f90ec
Show file tree
Hide file tree
Showing 7 changed files with 249 additions and 148 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.limechain.exception.grandpa;

public class EstimateExecutionException extends RuntimeException {
public EstimateExecutionException(String message) {
super(message);
}
}
4 changes: 2 additions & 2 deletions src/main/java/com/limechain/grandpa/round/FinalizeStage.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ public void start(GrandpaRound round) {
public void end(GrandpaRound round) {
log.info(String.format("Round %d met finalization conditions and will be finalized.", round.getRoundNumber()));
round.setOnFinalizeHandler(null);
round.attemptToFinalizeAt();
round.attemptToFinalize();
log.fine(String.format("Round %d exits Finalize stage.", round.getRoundNumber()));

round.end();
round.complete();
}

private boolean isRoundReadyToBeFinalized(GrandpaRound round) {
Expand Down
Loading

0 comments on commit 87f90ec

Please sign in to comment.