Skip to content

Commit 1c6f877

Browse files
authored
Merge pull request #2122 from CortexFoundation/dev
forkid time fix
2 parents 655c980 + 7b0b96f commit 1c6f877

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/forkid/forkid.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ func newFilter(config *params.ChainConfig, genesis *types.Block, headfn func() (
141141
// Add two sentries to simplify the fork checks and don't require special
142142
// casing the last one.
143143
forks = append(forks, math.MaxUint64) // Last fork will never be passed
144+
if len(forksByTime) == 0 {
145+
// In purely block based forks, avoid the sentry spilling into timestapt territory
146+
forksByBlock = append(forksByBlock, math.MaxUint64) // Last fork will never be passed
147+
}
144148

145149
// Create a validator that will filter out incompatible chains
146150
return func(id ID) error {

0 commit comments

Comments
 (0)