From 2a08fb8fe3ffaff3de41aa7427ba5c38c1559232 Mon Sep 17 00:00:00 2001 From: Nikolay Volf Date: Tue, 31 May 2016 21:17:46 +0200 Subject: [PATCH] and conditional dispatch --- ethcore/src/client/client.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 6ff56b3ea..4df72f1fd 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -338,7 +338,17 @@ impl Client where V: Verifier { { if !imported_blocks.is_empty() && self.block_queue.queue_info().is_empty() { let (enacted, retracted) = self.calculate_enacted_retracted(import_results); - self.miner.chain_new_blocks(self, &imported_blocks, &invalid_blocks, &enacted, &retracted); + + if self.queue_info().is_empty() { + self.miner.chain_new_blocks(self, &imported_blocks, &invalid_blocks, &enacted, &retracted); + } + + io.send(NetworkIoMessage::User(SyncMessage::NewChainBlocks { + imported: imported_blocks, + invalid: invalid_blocks, + enacted: enacted, + retracted: retracted, + })).unwrap(); } }