Skip to content

Commit 360152b

Browse files
gballetrjl493456442
andcommitted
add Gary's comment
Co-authored-by: rjl493456442 <[email protected]>
1 parent 2ebffb9 commit 360152b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

internal/ethapi/api.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,9 +1188,14 @@ func (api *BlockChainAPI) Config(ctx context.Context) (*configResponse, error) {
11881188
for addr, c := range vm.ActivePrecompiledContracts(rules) {
11891189
precompiles[c.Name()] = addr
11901190
}
1191+
// Activation time is required. If a fork is activated at genesis the value 0 is used
1192+
activationTime := t
1193+
if genesis.Time >= t {
1194+
activationTime = 0
1195+
}
11911196
forkid := forkid.NewID(c, types.NewBlockWithHeader(genesis), ^uint64(0), t).Hash
11921197
return &config{
1193-
ActivationTime: t,
1198+
ActivationTime: activationTime,
11941199
BlobSchedule: c.BlobConfig(c.LatestFork(t)),
11951200
ChainId: (*hexutil.Big)(c.ChainID),
11961201
ForkId: forkid[:],

0 commit comments

Comments
 (0)