iotex-core
iotex-core copied to clipboard
[genesis] Remove global var `genesisTs`
What would you like to be added:
Load genesis.SetGenesisTimestamp(genesisCfg.Timestamp) in main.go in a proper way
Does this means simply to move genesis.SetGenesisTimestamp(genesisCfg.Timestamp) function to server/main.go file?
Does this means simply to move
genesis.SetGenesisTimestamp(genesisCfg.Timestamp)function toserver/main.gofile?
no
how about replace global vars with pattern like this
https://github.com/iotexproject/iotex-core/blob/8847e037c7163e3c8aed8f77e2fb6ed0c4f7f924/api/serverV2.go#L31-L50