Recude logging in ImportBlocksTask (#252)

Fixes #248
Danno Ferrin 6 years ago committed by GitHub
parent 5566eb36d8
commit c174ae3b68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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