From a8772ed5c1ddad651b7320644f604558d7422cd6 Mon Sep 17 00:00:00 2001 From: arkpar Date: Tue, 29 Mar 2016 23:29:43 +0200 Subject: [PATCH] Track import errors and restart sync --- sync/src/chain.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sync/src/chain.rs b/sync/src/chain.rs index 9194bf1d9..81fd5f9ab 100644 --- a/sync/src/chain.rs +++ b/sync/src/chain.rs @@ -1344,6 +1344,10 @@ impl ChainSync { // Propagate latests blocks self.propagate_latest_blocks(io); } + if !invalid.is_empty() { + trace!(target: "sync", "Bad blocks in the queue, restarting"); + self.restart_on_bad_block(io); + } // TODO [todr] propagate transactions? }