diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-10-26 17:39:03 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-11-21 21:09:38 +0800 |
commit | 80be5e546398203c1958a0f512e651a2c36b1fe0 (patch) | |
tree | 8734682b62b3da4a9596dd3cf632d7501d309a8f /cmd/puppeth/wizard_node.go | |
parent | 7abf968d6fbc5955fedac6f3aba27afdca02176f (diff) | |
download | go-tangerine-80be5e546398203c1958a0f512e651a2c36b1fe0.tar go-tangerine-80be5e546398203c1958a0f512e651a2c36b1fe0.tar.gz go-tangerine-80be5e546398203c1958a0f512e651a2c36b1fe0.tar.bz2 go-tangerine-80be5e546398203c1958a0f512e651a2c36b1fe0.tar.lz go-tangerine-80be5e546398203c1958a0f512e651a2c36b1fe0.tar.xz go-tangerine-80be5e546398203c1958a0f512e651a2c36b1fe0.tar.zst go-tangerine-80be5e546398203c1958a0f512e651a2c36b1fe0.zip |
cmd/puppeth: store genesis locally to persist restarts
Diffstat (limited to 'cmd/puppeth/wizard_node.go')
-rw-r--r-- | cmd/puppeth/wizard_node.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd/puppeth/wizard_node.go b/cmd/puppeth/wizard_node.go index f5b2d7358..a70178db2 100644 --- a/cmd/puppeth/wizard_node.go +++ b/cmd/puppeth/wizard_node.go @@ -29,7 +29,7 @@ import ( // deployNode creates a new node configuration based on some user input. func (w *wizard) deployNode(boot bool) { // Do some sanity check before the user wastes time on input - if w.conf.genesis == nil { + if w.conf.Genesis == nil { log.Error("No genesis block configured") return } @@ -53,8 +53,8 @@ func (w *wizard) deployNode(boot bool) { infos = &nodeInfos{portFull: 30303, peersTotal: 50, peersLight: 0, gasTarget: 4.7, gasPrice: 18} } } - infos.genesis, _ = json.MarshalIndent(w.conf.genesis, "", " ") - infos.network = w.conf.genesis.Config.ChainId.Int64() + infos.genesis, _ = json.MarshalIndent(w.conf.Genesis, "", " ") + infos.network = w.conf.Genesis.Config.ChainId.Int64() // Figure out where the user wants to store the persistent data fmt.Println() @@ -65,7 +65,7 @@ func (w *wizard) deployNode(boot bool) { fmt.Printf("Where should data be stored on the remote machine? (default = %s)\n", infos.datadir) infos.datadir = w.readDefaultString(infos.datadir) } - if w.conf.genesis.Config.Ethash != nil && !boot { + if w.conf.Genesis.Config.Ethash != nil && !boot { fmt.Println() if infos.ethashdir == "" { fmt.Printf("Where should the ethash mining DAGs be stored on the remote machine?\n") @@ -101,7 +101,7 @@ func (w *wizard) deployNode(boot bool) { } // If the node is a miner/signer, load up needed credentials if !boot { - if w.conf.genesis.Config.Ethash != nil { + if w.conf.Genesis.Config.Ethash != nil { // Ethash based miners only need an etherbase to mine against fmt.Println() if infos.etherbase == "" { @@ -116,7 +116,7 @@ func (w *wizard) deployNode(boot bool) { fmt.Printf("What address should the miner user? (default = %s)\n", infos.etherbase) infos.etherbase = w.readDefaultAddress(common.HexToAddress(infos.etherbase)).Hex() } - } else if w.conf.genesis.Config.Clique != nil { + } else if w.conf.Genesis.Config.Clique != nil { // If a previous signer was already set, offer to reuse it if infos.keyJSON != "" { if key, err := keystore.DecryptKey([]byte(infos.keyJSON), infos.keyPass); err != nil { |