Skip to content

Commit

Permalink
Reducing verbosity during BWS errors
Browse files Browse the repository at this point in the history
Stacktrace can be retrieved by increasing the log level

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
  • Loading branch information
gezero committed Aug 25, 2022
1 parent 98e214c commit 5ca0716
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,24 +202,24 @@ protected void processException(final Throwable throwable) {
backwardSyncException -> {
if (backwardSyncException.shouldRestart()) {
LOG.info(
"Backward sync failed ({}). Current Peers: {}. Retrying in "
+ millisBetweenRetries
+ " milliseconds...",
backwardSyncException.getMessage(),
ethContext.getEthPeers().peerCount());
return;
"Backward sync failed ({}). Current Peers: {}. Retrying in {} milliseconds...",
throwable.getMessage(),
ethContext.getEthPeers().peerCount(),
millisBetweenRetries);
} else {
debugLambda(
LOG, "Not recoverable backward sync exception {}", throwable::getMessage);
throw backwardSyncException;
}
},
() ->
LOG.warn(
"There was an uncaught exception during Backwards Sync. Retrying in "
+ millisBetweenRetries
+ " milliseconds...",
throwable));
() -> {
LOG.warn(
"Backward sync failed ({}). Current Peers: {}. Retrying in {} milliseconds...",
throwable.getMessage(),
ethContext.getEthPeers().peerCount(),
millisBetweenRetries);
LOG.debug("Exception details:", throwable);
});
}

private Optional<BackwardSyncException> extractBackwardSyncException(final Throwable throwable) {
Expand Down

0 comments on commit 5ca0716

Please sign in to comment.