Skip to content

Commit 46857f0

Browse files
committed
tweak empty block logic
1 parent deefa7e commit 46857f0

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

miner/worker.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ func (w *worker) newWorkLoop(recommit time.Duration) {
469469
case head := <-w.chainHeadCh:
470470
clearPending(head.Block.NumberU64())
471471
timestamp = time.Now().Unix()
472-
commit(false, commitInterruptNewHead)
472+
commit(true, commitInterruptNewHead)
473473

474474
case <-timer.C:
475475
// If mining is running resubmit a new work cycle periodically to pull in
@@ -480,7 +480,7 @@ func (w *worker) newWorkLoop(recommit time.Duration) {
480480
timer.Reset(recommit)
481481
continue
482482
}
483-
commit(false, commitInterruptResubmit)
483+
commit(true, commitInterruptResubmit)
484484
}
485485

486486
case interval := <-w.resubmitIntervalCh:
@@ -1467,9 +1467,9 @@ func (w *worker) commitNewWork(interrupt *int32, noempty bool, timestamp int64)
14671467
}
14681468

14691469
// do not produce empty blocks
1470-
if w.current.tcount == 0 {
1471-
return
1472-
}
1470+
// if w.current.tcount == 0 {
1471+
// return
1472+
// }
14731473

14741474
w.commit(uncles, w.fullTaskHook, true, tstart)
14751475
}

params/version.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ import (
2323

2424
const (
2525
VersionMajor = 5 // Major version component of the current release
26-
VersionMinor = 1 // Minor version component of the current release
27-
VersionPatch = 31 // Patch version component of the current release
28-
VersionMeta = "4844-v0" // Version metadata to append to the version string
26+
VersionMinor = 2 // Minor version component of the current release
27+
VersionPatch = 1 // Patch version component of the current release
28+
VersionMeta = "4844-v1" // Version metadata to append to the version string
2929
)
3030

3131
// Version holds the textual version string.

0 commit comments

Comments
 (0)