Reducing verbosity during BWS errors (#4311)

Stacktrace can be retrieved by increasing the log level

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
pull/4316/head
Jiri Peinlich 2 years ago committed by GitHub
parent d438b1a273
commit b257791498
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 24
      ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/backwardsync/BackwardSyncContext.java

@ -202,24 +202,24 @@ public class BackwardSyncContext {
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) {

Loading…
Cancel
Save