Skip to content

Commit

Permalink
Disable max seal period for external sealing (openethereum#4927)
Browse files Browse the repository at this point in the history
* no max sealing when external

* force internal sealing
  • Loading branch information
keorn authored and gavofyork committed Mar 20, 2017
1 parent 05cd715 commit e228de1
Showing 1 changed file with 2 additions and 4 deletions.
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

0 comments on commit e228de1

Please sign in to comment.