Don't call update_sealing on importing own block (#1762)

This commit is contained in:
Arkadiy Paronyan 2016-07-29 09:56:55 +02:00 committed by Gav Wood
parent e4f0c0b215
commit b37086722a

View File

@ -1041,8 +1041,6 @@ impl MiningBlockChainClient for Client {
let _timer = PerfTimer::new("import_sealed_block");
let start = precise_time_ns();
let original_best = self.chain_info().best_block_hash;
let h = block.header().hash();
let number = block.header().number();
@ -1050,7 +1048,6 @@ impl MiningBlockChainClient for Client {
let route = self.commit_block(block, &h, &block_data);
trace!(target: "client", "Imported sealed block #{} ({})", number, h);
{
let (enacted, retracted) = self.calculate_enacted_retracted(&[route]);
self.miner.chain_new_blocks(self, &[h.clone()], &[], &enacted, &retracted);
@ -1064,12 +1061,6 @@ impl MiningBlockChainClient for Client {
precise_time_ns() - start,
);
});
}
if self.chain_info().best_block_hash != original_best {
self.miner.update_sealing(self);
}
Ok(h)
}
}