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 @Override
protected void executeTaskWithPeer(final EthPeer peer) throws PeerNotConnected { protected void executeTaskWithPeer(final EthPeer peer) throws PeerNotConnected {
this.peer = peer; this.peer = peer;
LOG.info("Importing blocks from {}", startNumber); LOG.debug("Importing blocks from {}", startNumber);
downloadHeaders() downloadHeaders()
.thenCompose(this::completeBlocks) .thenCompose(this::completeBlocks)
.thenCompose(this::importBlocks) .thenCompose(this::importBlocks)
.whenComplete( .whenComplete(
(r, t) -> { (r, t) -> {
if (t != null) { if (t != null) {
LOG.info("Import from block {} failed: {}.", startNumber, t); LOG.debug("Import from block {} failed: {}.", startNumber, t);
result.get().completeExceptionally(t); result.get().completeExceptionally(t);
} else { } else {
LOG.info("Import from block {} succeeded.", startNumber); LOG.debug("Import from block {} succeeded.", startNumber);
result.get().complete(new PeerTaskResult<>(peer, r)); result.get().complete(new PeerTaskResult<>(peer, r));
} }
}); });

Loading…
Cancel
Save