iotex-core icon indicating copy to clipboard operation
iotex-core copied to clipboard

[genesis] Remove global var `genesisTs`

Open Liuhaai opened this issue 2 years ago • 3 comments

What would you like to be added: Load genesis.SetGenesisTimestamp(genesisCfg.Timestamp) in main.go in a proper way

Liuhaai avatar Mar 04 '22 19:03 Liuhaai

Does this means simply to move genesis.SetGenesisTimestamp(genesisCfg.Timestamp) function to server/main.go file?

LuckyPigeon avatar Mar 28 '22 18:03 LuckyPigeon

Does this means simply to move genesis.SetGenesisTimestamp(genesisCfg.Timestamp) function to server/main.go file?

no

Liuhaai avatar Mar 30 '22 02:03 Liuhaai

how about replace global vars with pattern like this https://github.com/iotexproject/iotex-core/blob/8847e037c7163e3c8aed8f77e2fb6ed0c4f7f924/api/serverV2.go#L31-L50

LuckyPigeon avatar Mar 30 '22 15:03 LuckyPigeon