Recude logging in ImportBlocksTask (#252)

Fixes #248
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
Danno Ferrin 6 years ago committed by GitHub
parent 09a3c61f72
commit 66d8b75e2b
  1. 6
      ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/ImportBlocksTask.java

@ -74,17 +74,17 @@ public class ImportBlocksTask<C> extends AbstractPeerTask<List<Block>> {
@Override
protected void executeTaskWithPeer(final EthPeer peer) throws PeerNotConnected {
this.peer = peer;
LOG.info("Importing blocks from {}", startNumber);
LOG.debug("Importing blocks from {}", startNumber);
downloadHeaders()
.thenCompose(this::completeBlocks)
.thenCompose(this::importBlocks)
.whenComplete(
(r, t) -> {
if (t != null) {
LOG.info("Import from block {} failed: {}.", startNumber, t);
LOG.debug("Import from block {} failed: {}.", startNumber, t);
result.get().completeExceptionally(t);
} else {
LOG.info("Import from block {} succeeded.", startNumber);
LOG.debug("Import from block {} succeeded.", startNumber);
result.get().complete(new PeerTaskResult<>(peer, r));
}
});

Loading…
Cancel
Save