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

Disable max seal period for external sealing #4927

Merged
merged 4 commits into from
Mar 20, 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: 2 additions & 4 deletions ethcore/src/miner/miner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,7 @@ impl Miner {
}

fn forced_sealing(&self) -> bool {
self.options.force_sealing
|| !self.notifiers.read().is_empty()
|| Instant::now() > *self.next_mandatory_reseal.read()
self.options.force_sealing || !self.notifiers.read().is_empty()
}

/// Clear all pending block states
Expand Down Expand Up @@ -484,7 +482,7 @@ impl Miner {

/// Attempts to perform internal sealing (one that does not require work) and handles the result depending on the type of Seal.
fn seal_and_import_block_internally(&self, chain: &MiningBlockChainClient, block: ClosedBlock) -> bool {
if !block.transactions().is_empty() || self.forced_sealing() {
if !block.transactions().is_empty() || self.forced_sealing() || Instant::now() > *self.next_mandatory_reseal.read() {
trace!(target: "miner", "seal_block_internally: attempting internal seal.");
match self.engine.generate_seal(block.block()) {
// Save proposal for later seal submission and broadcast it.
Expand Down