mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core/forkid: simplify logic for dropping time-based forks
This commit is contained in:
parent
b47f835c54
commit
8b274f3a1a
1 changed files with 1 additions and 4 deletions
|
|
@ -289,10 +289,7 @@ func gatherForks(config *params.ChainConfig, genesis uint64) ([]uint64, []uint64
|
|||
if len(forksByBlock) > 0 && forksByBlock[0] == 0 {
|
||||
forksByBlock = forksByBlock[1:]
|
||||
}
|
||||
if len(forksByTime) > 0 && forksByTime[0] == 0 {
|
||||
forksByTime = forksByTime[1:]
|
||||
}
|
||||
// Skip any forks by time that are non-zero, but before genesis.
|
||||
// Skip any forks before genesis.
|
||||
for len(forksByTime) > 0 && forksByTime[0] <= genesis {
|
||||
forksByTime = forksByTime[1:]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue