core/forkid: add comment about skipping non-zero fork times

This commit is contained in:
lightclient 2023-08-30 17:38:44 -07:00
parent 9ed60b84b1
commit e27464ada2
No known key found for this signature in database
GPG key ID: 75C916AFEE20183E

View file

@ -292,6 +292,7 @@ func gatherForks(config *params.ChainConfig, genesis uint64) ([]uint64, []uint64
if len(forksByTime) > 0 && forksByTime[0] == 0 {
forksByTime = forksByTime[1:]
}
// Skip any forks by time that are non-zero, but before genesis.
if len(forksByTime) > 0 && forksByTime[0] <= genesis {
forksByTime = forksByTime[1:]
}