Chore:Resolved EnginerGetClientVersionV1 fails for local build (#7687)

Signed-off-by: Preeti <35308865+pr9t@users.noreply.github.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
pull/7689/head
Preeti 2 months ago committed by GitHub
parent 7f9c4fc259
commit f541710c65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineGetClientVersionV1.java

@ -49,9 +49,11 @@ public class EngineGetClientVersionV1 extends ExecutionEngineJsonRpcMethod {
@Override
public JsonRpcResponse syncResponse(final JsonRpcRequestContext request) {
String safeCommit =
(commit != null && commit.length() >= 8) ? commit.substring(0, 8) : "unknown";
return new JsonRpcSuccessResponse(
request.getRequest().getId(),
new EngineGetClientVersionResultV1(
ENGINE_CLIENT_CODE, ENGINE_CLIENT_NAME, clientVersion, commit.substring(0, 8)));
ENGINE_CLIENT_CODE, ENGINE_CLIENT_NAME, clientVersion, safeCommit));
}
}

Loading…
Cancel
Save