Merge pull request #6223 from paritytech/instant_seal_fix
InstantSeal fix
This commit is contained in:
commit
62153b1ff0
@ -19,7 +19,7 @@ use util::Address;
|
|||||||
use builtin::Builtin;
|
use builtin::Builtin;
|
||||||
use engines::{Engine, Seal};
|
use engines::{Engine, Seal};
|
||||||
use spec::CommonParams;
|
use spec::CommonParams;
|
||||||
use block::ExecutedBlock;
|
use block::{ExecutedBlock, IsBlock};
|
||||||
|
|
||||||
/// An engine which does not provide any consensus mechanism, just seals blocks internally.
|
/// An engine which does not provide any consensus mechanism, just seals blocks internally.
|
||||||
pub struct InstantSeal {
|
pub struct InstantSeal {
|
||||||
@ -56,8 +56,8 @@ impl Engine for InstantSeal {
|
|||||||
|
|
||||||
fn seals_internally(&self) -> Option<bool> { Some(true) }
|
fn seals_internally(&self) -> Option<bool> { Some(true) }
|
||||||
|
|
||||||
fn generate_seal(&self, _block: &ExecutedBlock) -> Seal {
|
fn generate_seal(&self, block: &ExecutedBlock) -> Seal {
|
||||||
Seal::Regular(Vec::new())
|
if block.transactions().is_empty() { Seal::None } else { Seal::Regular(Vec::new()) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user