ethcore: fix ancient block error msg handling (#8832)

This commit is contained in:
André Silva 2018-06-07 10:15:21 +01:00 committed by Niklas Adolfsson
parent 1318f536c9
commit c8877d4098
1 changed files with 5 additions and 4 deletions

View File

@ -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 {