update genesis.Config.Clique.Epoch = genesis.Config.Clique.RewardCheckpoint = epochNumber

This commit is contained in:
Nguyen Ba Tam 2018-08-14 17:16:57 +07:00 committed by Tuna
parent a554c5b968
commit 879c3283d5

View file

@ -70,7 +70,7 @@ func (w *wizard) makeGenesis() {
genesis.Config.Ethash = new(params.EthashConfig) genesis.Config.Ethash = new(params.EthashConfig)
genesis.ExtraData = make([]byte, 32) genesis.ExtraData = make([]byte, 32)
case choice == "2": case choice == "2":
// In the case of clique, configure the consensus parameters // In the case of clique, configure the consensus parameters
genesis.Difficulty = big.NewInt(1) genesis.Difficulty = big.NewInt(1)
genesis.Config.Clique = &params.CliqueConfig{ genesis.Config.Clique = &params.CliqueConfig{
@ -160,8 +160,9 @@ func (w *wizard) makeGenesis() {
fmt.Println() fmt.Println()
fmt.Println("How many blocks per epoch? (default = 900)") fmt.Println("How many blocks per epoch? (default = 900)")
epochNumber := w.readDefaultInt(900) epochNumber := uint64(w.readDefaultInt(900))
genesis.Config.Posv.RewardCheckpoint = uint64(epochNumber) genesis.Config.Posv.Epoch = genesis.Config.Posv.RewardCheckpoint
genesis.Config.Posv.RewardCheckpoint = epochNumber
fmt.Println() fmt.Println()
fmt.Println("How many blocks before checkpoint need to prepare new set of masternodes? (default = 450)") fmt.Println("How many blocks before checkpoint need to prepare new set of masternodes? (default = 450)")