Revert "fix: revert block-on-demand (and use constant block time for … (#226)

Revert "fix: revert block-on-demand (and use constant block time for clique) (#193)"

This reverts commit 5ca70bf3a2.
This commit is contained in:
HAOYUatHZ 2023-02-23 06:30:49 +08:00 committed by GitHub
parent 3fcd77955e
commit 96642f5be6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -397,7 +397,7 @@ func (w *worker) newWorkLoop(recommit time.Duration) {
case head := <-w.chainHeadCh: case head := <-w.chainHeadCh:
clearPending(head.Block.NumberU64()) clearPending(head.Block.NumberU64())
timestamp = time.Now().Unix() timestamp = time.Now().Unix()
commit(false, commitInterruptNewHead) commit(true, commitInterruptNewHead)
case <-timer.C: case <-timer.C:
// If mining is running resubmit a new work cycle periodically to pull in // If mining is running resubmit a new work cycle periodically to pull in