Fixed default for foundation wallet address at puppeth.

This commit is contained in:
DinhLN 2018-08-17 15:52:16 +07:00
parent ac1c1ec60c
commit 98eecdca1b
2 changed files with 5 additions and 2 deletions

View file

@ -169,8 +169,8 @@ func (w *wizard) makeGenesis() {
genesis.Config.Posv.Gap = uint64(w.readDefaultInt(450)) genesis.Config.Posv.Gap = uint64(w.readDefaultInt(450))
fmt.Println() fmt.Println()
fmt.Println("What is foundation wallet address?") fmt.Println("What is foundation wallet address? (default = 0x0000000000000000000000000000000000000068)")
genesis.Config.Posv.FoudationWalletAddr = *w.readAddress() genesis.Config.Posv.FoudationWalletAddr = w.readDefaultAddress(common.HexToAddress("0x0000000000000000000000000000000000000068"))
// Validator Smart Contract Code // Validator Smart Contract Code
pKey, _ := crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291") pKey, _ := crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")

View file

@ -218,6 +218,9 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
number := header.Number.Uint64() number := header.Number.Uint64()
rCheckpoint := chain.Config().Posv.RewardCheckpoint rCheckpoint := chain.Config().Posv.RewardCheckpoint
foudationWalletAddr := chain.Config().Posv.FoudationWalletAddr foudationWalletAddr := chain.Config().Posv.FoudationWalletAddr
if foudationWalletAddr == (common.Address{}) {
log.Error("Foundation Wallet Address is empty", "error", foudationWalletAddr)
}
if number > 0 && number-rCheckpoint > 0 && foudationWalletAddr != (common.Address{}) { if number > 0 && number-rCheckpoint > 0 && foudationWalletAddr != (common.Address{}) {
// Get signers in blockSigner smartcontract. // Get signers in blockSigner smartcontract.
addr := common.HexToAddress(common.BlockSigners) addr := common.HexToAddress(common.BlockSigners)