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

InstantSeal fix #6223

Merged
merged 1 commit into from
Aug 4, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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