fix initial hardfork transition in CommonRef

This commit is contained in:
jangko 2023-06-12 11:06:04 +07:00
parent 932a2140f2
commit 0128c82c52
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
1 changed files with 2 additions and 2 deletions

View File

@ -150,8 +150,8 @@ proc init(com : CommonRef,
# set it before creating genesis block
# TD need to be some(0.u256) because it can be the genesis
# already at the MergeFork
let optionalGenesisTime = if genesis.isNil: none[EthTime]() else: some(genesis.timestamp)
com.hardForkTransition(ForkDeterminationInfo(blockNumber: 0.toBlockNumber, td: some(0.u256), time: optionalGenesisTime))
const TimeZero = fromUnix(0)
com.hardForkTransition(ForkDeterminationInfo(blockNumber: 0.toBlockNumber, td: some(0.u256), time: some(TimeZero)))
# com.forkIds and com.blockZeroHash is set
# by setForkId