mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
lower min recommit interval to enable faster blocktime (#9)
This commit is contained in:
parent
7285ddd28b
commit
0f5fc961ba
2 changed files with 8 additions and 2 deletions
|
|
@ -57,7 +57,9 @@ const (
|
||||||
|
|
||||||
// minRecommitInterval is the minimal time interval to recreate the sealing block with
|
// minRecommitInterval is the minimal time interval to recreate the sealing block with
|
||||||
// any newly arrived transactions.
|
// any newly arrived transactions.
|
||||||
minRecommitInterval = 1 * time.Second
|
// <specular modification>
|
||||||
|
minRecommitInterval = 100 * time.Millisecond
|
||||||
|
// <specular modification/>
|
||||||
|
|
||||||
// maxRecommitInterval is the maximum time interval to recreate the sealing block with
|
// maxRecommitInterval is the maximum time interval to recreate the sealing block with
|
||||||
// any newly arrived transactions.
|
// any newly arrived transactions.
|
||||||
|
|
|
||||||
|
|
@ -297,7 +297,11 @@ func testAdjustInterval(t *testing.T, chainConfig *params.ChainConfig, engine co
|
||||||
estimate = estimate*(1-intervalAdjustRatio) + intervalAdjustRatio*(min-intervalAdjustBias)
|
estimate = estimate*(1-intervalAdjustRatio) + intervalAdjustRatio*(min-intervalAdjustBias)
|
||||||
wantMinInterval, wantRecommitInterval = 3*time.Second, time.Duration(estimate)*time.Nanosecond
|
wantMinInterval, wantRecommitInterval = 3*time.Second, time.Duration(estimate)*time.Nanosecond
|
||||||
case 3:
|
case 3:
|
||||||
wantMinInterval, wantRecommitInterval = time.Second, time.Second
|
// <specular modification>
|
||||||
|
// lower than upstream test, since enforced min recommit interval is lower
|
||||||
|
wantMinInterval, wantRecommitInterval = 500*time.Millisecond, 500*time.Millisecond
|
||||||
|
// <specular modification/>
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check interval
|
// Check interval
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue