diff --git a/miner/worker.go b/miner/worker.go index 09c2ae84ea..b4e2f8292e 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -57,7 +57,9 @@ const ( // minRecommitInterval is the minimal time interval to recreate the sealing block with // any newly arrived transactions. - minRecommitInterval = 1 * time.Second + // + minRecommitInterval = 100 * time.Millisecond + // // maxRecommitInterval is the maximum time interval to recreate the sealing block with // any newly arrived transactions. diff --git a/miner/worker_test.go b/miner/worker_test.go index 9c4694c0e2..26d1fb3a2b 100644 --- a/miner/worker_test.go +++ b/miner/worker_test.go @@ -297,7 +297,11 @@ func testAdjustInterval(t *testing.T, chainConfig *params.ChainConfig, engine co estimate = estimate*(1-intervalAdjustRatio) + intervalAdjustRatio*(min-intervalAdjustBias) wantMinInterval, wantRecommitInterval = 3*time.Second, time.Duration(estimate)*time.Nanosecond case 3: - wantMinInterval, wantRecommitInterval = time.Second, time.Second + // + // lower than upstream test, since enforced min recommit interval is lower + wantMinInterval, wantRecommitInterval = 500*time.Millisecond, 500*time.Millisecond + // + } // Check interval