Make InstantSeal Instant again (#11186)

* Make InstantSeal Instant again

* update_sealing if there are transactions in pool after impoerting a block, some line formatting

* Apply suggestions from code review

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* InstantSeal specific behaviour

* introduce engine.should_reseal_on_update, remove InstantSealService

* remove unused code

* add force param to update_sealing

* better docc

* even better docs

* revert code changes, doc corrections, sort dep

* code optimization

* fix test

* fix bench
This commit is contained in:
Seun LanLege
2019-11-10 11:41:31 +01:00
committed by Andronik Ordian
parent 8adde605e9
commit 887aa62fdb
16 changed files with 134 additions and 66 deletions

View File

@@ -72,7 +72,7 @@ use client::{
use client_traits::{
BlockInfo, Nonce, Balance, ChainInfo, TransactionInfo, BlockChainClient, ImportBlock,
AccountData, BlockChain, IoClient, BadBlocks, ScheduleInfo, StateClient, ProvingBlockChainClient,
StateOrBlock
StateOrBlock, ForceUpdateSealing
};
use engine::Engine;
use machine::executed::Executed;
@@ -963,8 +963,8 @@ impl ProvingBlockChainClient for TestBlockChainClient {
}
impl client_traits::EngineClient for TestBlockChainClient {
fn update_sealing(&self) {
self.miner.update_sealing(self)
fn update_sealing(&self, force: ForceUpdateSealing) {
self.miner.update_sealing(self, force)
}
fn submit_seal(&self, block_hash: H256, seal: Vec<Bytes>) {