From c8877d40989fa69822b7c4764af7e67ddb4cfb52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Thu, 7 Jun 2018 10:15:21 +0100 Subject: [PATCH] ethcore: fix ancient block error msg handling (#8832) --- ethcore/src/client/client.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 3f19f491b..ea8fa8863 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -2073,15 +2073,16 @@ impl IoClient for Client { let first = queued.write().1.pop_front(); if let Some((header, block_bytes, receipts_bytes)) = first { let hash = header.hash(); - client.importer.import_old_block( + let result = client.importer.import_old_block( &header, &block_bytes, &receipts_bytes, &**client.db.read(), - &*client.chain.read() - ).ok().map_or((), |e| { + &*client.chain.read(), + ); + if let Err(e) = result { error!(target: "client", "Error importing ancient block: {}", e); - }); + } // remove from pending queued.write().0.remove(&hash); } else {