cmd/puppeth: store genesis locally to persist restarts

This commit is contained in:
Péter Szilágyi
2017-10-26 12:39:03 +03:00
parent 7abf968d6f
commit 80be5e5463
9 changed files with 64 additions and 49 deletions

View File

@ -32,7 +32,7 @@ import (
// configuration set to give users hints on how to do various tasks.
func (w *wizard) networkStats() {
if len(w.servers) == 0 {
log.Error("No remote machines to gather stats from")
log.Info("No remote machines to gather stats from")
return
}
// Clear out some previous configs to refill from current scan
@ -173,12 +173,12 @@ func (w *wizard) gatherStats(server string, pubkey []byte, client *sshClient) *s
w.lock.Lock()
defer w.lock.Unlock()
if genesis != "" && w.conf.genesis == nil {
if genesis != "" && w.conf.Genesis == nil {
g := new(core.Genesis)
if err := json.Unmarshal([]byte(genesis), g); err != nil {
log.Error("Failed to parse remote genesis", "err", err)
} else {
w.conf.genesis = g
w.conf.Genesis = g
}
}
if ethstats != "" {