From 98eecdca1b231990f1a5b54733438b2592928630 Mon Sep 17 00:00:00 2001 From: DinhLN Date: Fri, 17 Aug 2018 15:52:16 +0700 Subject: [PATCH] Fixed default for foundation wallet address at puppeth. --- cmd/puppeth/wizard_genesis.go | 4 ++-- eth/backend.go | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/puppeth/wizard_genesis.go b/cmd/puppeth/wizard_genesis.go index 1bf2c82ad7..5de99009e0 100644 --- a/cmd/puppeth/wizard_genesis.go +++ b/cmd/puppeth/wizard_genesis.go @@ -169,8 +169,8 @@ func (w *wizard) makeGenesis() { genesis.Config.Posv.Gap = uint64(w.readDefaultInt(450)) fmt.Println() - fmt.Println("What is foundation wallet address?") - genesis.Config.Posv.FoudationWalletAddr = *w.readAddress() + fmt.Println("What is foundation wallet address? (default = 0x0000000000000000000000000000000000000068)") + genesis.Config.Posv.FoudationWalletAddr = w.readDefaultAddress(common.HexToAddress("0x0000000000000000000000000000000000000068")) // Validator Smart Contract Code pKey, _ := crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291") diff --git a/eth/backend.go b/eth/backend.go index 083a23126b..dc4ac6acd7 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -218,6 +218,9 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) { number := header.Number.Uint64() rCheckpoint := chain.Config().Posv.RewardCheckpoint 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{}) { // Get signers in blockSigner smartcontract. addr := common.HexToAddress(common.BlockSigners)