mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
feat: reduce wait time when block time already large
This commit is contained in:
parent
70a3e886cc
commit
8556473e69
1 changed files with 2 additions and 2 deletions
|
|
@ -366,9 +366,9 @@ func getResetTime(chain *core.BlockChain, minePeriod int, prevReset0TimeMillisec
|
|||
if resetTime > minePeriodDuration {
|
||||
resetTime = minePeriodDuration
|
||||
}
|
||||
// in case the current block is too far in the past, the block time already is huge, we wait for mine period
|
||||
// in case the current block is too far in the past, the block time already is huge, we wait for 0 time (which will be handled in the next if statement)
|
||||
if resetTime < 0 {
|
||||
resetTime = minePeriodDuration
|
||||
resetTime = 0
|
||||
}
|
||||
if resetTime == 0 {
|
||||
if nowTime == *prevReset0TimeMillisec {
|
||||
|
|
|
|||
Loading…
Reference in a new issue