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:
committed by
Andronik Ordian
parent
8adde605e9
commit
887aa62fdb
@@ -188,6 +188,14 @@ pub trait Engine: Sync + Send {
|
||||
/// Returns the engine's current sealing state.
|
||||
fn sealing_state(&self) -> SealingState { SealingState::External }
|
||||
|
||||
/// Called in `miner.chain_new_blocks` if the engine wishes to `update_sealing`
|
||||
/// after a block was recently sealed.
|
||||
///
|
||||
/// returns false by default
|
||||
fn should_reseal_on_update(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
/// Attempt to seal the block internally.
|
||||
///
|
||||
/// If `Some` is returned, then you get a valid seal.
|
||||
|
||||
Reference in New Issue
Block a user