From b0f9d73f6a55e705d96317f2ccdb011b6fedd1da Mon Sep 17 00:00:00 2001 From: debris Date: Thu, 3 Aug 2017 16:42:56 +0200 Subject: [PATCH] InstantSeal fix --- ethcore/src/engines/instant_seal.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ethcore/src/engines/instant_seal.rs b/ethcore/src/engines/instant_seal.rs index 114e27549..976f815e0 100644 --- a/ethcore/src/engines/instant_seal.rs +++ b/ethcore/src/engines/instant_seal.rs @@ -19,7 +19,7 @@ use util::Address; use builtin::Builtin; use engines::{Engine, Seal}; use spec::CommonParams; -use block::ExecutedBlock; +use block::{ExecutedBlock, IsBlock}; /// An engine which does not provide any consensus mechanism, just seals blocks internally. pub struct InstantSeal { @@ -56,8 +56,8 @@ impl Engine for InstantSeal { fn seals_internally(&self) -> Option { Some(true) } - fn generate_seal(&self, _block: &ExecutedBlock) -> Seal { - Seal::Regular(Vec::new()) + fn generate_seal(&self, block: &ExecutedBlock) -> Seal { + if block.transactions().is_empty() { Seal::None } else { Seal::Regular(Vec::new()) } } }