From f6bb1b2279a9e2f7867c400e1affbeeb4706c5d7 Mon Sep 17 00:00:00 2001 From: Adrian Sutton Date: Tue, 12 Feb 2019 06:42:30 +1000 Subject: [PATCH] Log errors that occur while finding a common ancestor (#814) Signed-off-by: Adrian Sutton --- .../pantheon/ethereum/eth/sync/SyncTargetManager.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/SyncTargetManager.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/SyncTargetManager.java index 7d652630c0..fc83e6a10b 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/SyncTargetManager.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/SyncTargetManager.java @@ -78,7 +78,13 @@ public abstract class SyncTargetManager { config.downloaderHeaderRequestSize(), ethTasksTimer) .run() - .handle((r, t) -> r) + .handle( + (result, error) -> { + if (error != null) { + LOG.debug("Failed to find common ancestor", error); + } + return result; + }) .thenCompose( (target) -> { if (target == null) {