Skip to content
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

Avoid a cyclic reference while printing EngineExchangeTransitionConfigurationParameter #4357

Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public JsonRpcResponse syncResponse(final JsonRpcRequestContext requestContext)
traceLambda(
LOG,
"received transitionConfiguration: {}",
() -> Json.encodePrettily(remoteTransitionConfiguration));
() -> Json.encodePrettily(remoteTransitionConfiguration.toString()));

final Optional<BlockHeader> maybeTerminalPoWBlockHeader =
mergeContextOptional.flatMap(MergeContext::getTerminalPoWBlock);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,13 @@ public Hash getTerminalBlockHash() {
public long getTerminalBlockNumber() {
return terminalBlockNumber;
}

@Override
public String toString() {
return "EngineExchangeTransitionConfigurationParameter{" +
"terminalTotalDifficulty=" + terminalTotalDifficulty.toShortHexString() +
", terminalBlockHash=" + terminalBlockHash.toShortHexString() +
", terminalBlockNumber=" + terminalBlockNumber +
'}';
}
daniellehrner marked this conversation as resolved.
Show resolved Hide resolved
}