Skip to content

Commit

Permalink
remove unnecessary PoS checkpoint methods and variables (hyperledger#…
Browse files Browse the repository at this point in the history
…6603)

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
  • Loading branch information
gfukushima authored and matthew1001 committed Jun 7, 2024
1 parent 56bc852 commit a0072ef
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ protected MergeContext createConsensusContext(
.getTerminalTotalDifficulty()
.map(Difficulty::of)
.orElse(Difficulty.ZERO))
.setCheckpointPostMergeSync(syncConfig.isCheckpointPostMergeEnabled())
.setPostMergeAtGenesis(isPostMergeAtGenesis);

blockchain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,6 @@ default boolean isChainPruningEnabled() {
return false;
}

/**
* Is checkpoint post merge sync.
*
* @return the boolean
*/
boolean isCheckpointPostMergeSync();

/**
* Is configured for a post-merge from genesis.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ public class PostMergeContext implements MergeContext {
private final AtomicReference<Optional<BlockHeader>> terminalPoWBlock =
new AtomicReference<>(Optional.empty());
private final BlockValueCalculator blockValueCalculator = new BlockValueCalculator();
private boolean isCheckpointPostMergeSync;
private boolean isPostMergeAtGenesis;

// TODO: cleanup - isChainPruningEnabled will not be required after
Expand All @@ -92,7 +91,6 @@ public class PostMergeContext implements MergeContext {
PostMergeContext(final Difficulty difficulty) {
this.terminalTotalDifficulty = new AtomicReference<>(difficulty);
this.syncState = new AtomicReference<>();
this.isCheckpointPostMergeSync = false;
}

/**
Expand Down Expand Up @@ -314,22 +312,6 @@ public boolean isChainPruningEnabled() {
return isChainPruningEnabled;
}

/**
* Sets checkpoint post merge sync.
*
* @param isCheckpointPostMergeSync the is checkpoint post merge sync
* @return the checkpoint post merge sync
*/
public PostMergeContext setCheckpointPostMergeSync(final boolean isCheckpointPostMergeSync) {
this.isCheckpointPostMergeSync = isCheckpointPostMergeSync;
return this;
}

@Override
public boolean isCheckpointPostMergeSync() {
return this.isCheckpointPostMergeSync;
}

@Override
public boolean isPostMergeAtGenesis() {
return this.isPostMergeAtGenesis;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,6 @@ public Optional<BlockWithReceipts> retrieveBlockById(final PayloadIdentifier pay
return postMergeContext.retrieveBlockById(payloadId);
}

@Override
public boolean isCheckpointPostMergeSync() {
return false;
}

@Override
public boolean isPostMergeAtGenesis() {
return postMergeContext.isPostMergeAtGenesis();
Expand Down

0 comments on commit a0072ef

Please sign in to comment.