Skip to content

Commit

Permalink
set max block generation interval to 1 second
Browse files Browse the repository at this point in the history
  • Loading branch information
sadoci committed Sep 23, 2019
1 parent 5b05cb2 commit 46c4bde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ func (w *worker) commitNewWork(interrupt *int32, noempty bool, timestamp int64)
num := parent.Number()
num.Add(num, common.Big1)
ts := w.ancestorTimes(num)
if dt, pt := w.throttleMining(ts); dt > 0 && pt < 5 {
if dt, pt := w.throttleMining(ts); dt > 0 && pt < 1 {
// sleep 1 second here to prevent unnecessary checks
log.Info("Metadium: too many blocks", "ahead", dt)
time.Sleep(time.Second)
Expand Down

0 comments on commit 46c4bde

Please sign in to comment.