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
1 changed files with 4 additions and 1 deletions

View File

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