Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
Update javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
usmansaleem committed Jul 25, 2024
1 parent 83f938d commit abae044
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,16 @@ public FinalizationUpdaterRpcMethod(final BlockchainService blockchainService) {
this.blockchainService = blockchainService;
}

/**
* Executes the RPC method. This method will be called by Besu RPC service.
*
* @param request Instance of PluginRpcRequest. The request object contains the parameters passed.
* @return Boolean.TRUE if the finalized block number is successfully updated.
* @throws PluginRpcEndpointException if the block number is invalid or the block is not found.
*/
public Boolean execute(final PluginRpcRequest request) {
LOG.trace("FinalizationUpdaterRpcMethod execute called");
/*
1. Returns true when the update was successful;
2. throws BlockNotFoundException when finalizedBlockNumber is not in the local chain
3. throws IllegalArgumentException when finalizedBlockNumber <= 0
*/

final Long finalizedBlockNumber = parseResult(request);
final Optional<BlockContext> finalizedBlock =
blockchainService.getBlockByNumber(finalizedBlockNumber);
Expand Down

0 comments on commit abae044

Please sign in to comment.