Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
InstantSeal fix
Browse files Browse the repository at this point in the history
  • Loading branch information
debris committed Aug 3, 2017
1 parent 0c7c34e commit b0f9d73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ethcore/src/engines/instant_seal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -56,8 +56,8 @@ impl Engine for InstantSeal {

fn seals_internally(&self) -> Option<bool> { 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()) }
}
}

Expand Down

0 comments on commit b0f9d73

Please sign in to comment.