Enable sealing when engine is ready (#10938)

This commit is contained in:
Anton Gavrilov 2019-08-06 11:07:27 +02:00 committed by David
parent 1503348782
commit 13ccb9f827

View File

@ -862,7 +862,10 @@ impl Miner {
fn prepare_and_update_sealing<C: miner::BlockChainClient>(&self, chain: &C) { fn prepare_and_update_sealing<C: miner::BlockChainClient>(&self, chain: &C) {
use miner::MinerService; use miner::MinerService;
match self.engine.sealing_state() { match self.engine.sealing_state() {
SealingState::Ready => self.update_sealing(chain), SealingState::Ready => {
self.maybe_enable_sealing();
self.update_sealing(chain)
}
SealingState::External => { SealingState::External => {
// this calls `maybe_enable_sealing()` // this calls `maybe_enable_sealing()`
if self.prepare_pending_block(chain) == BlockPreparationStatus::NotPrepared { if self.prepare_pending_block(chain) == BlockPreparationStatus::NotPrepared {