aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-05-30 19:50:48 +0800
committerGitHub <noreply@github.com>2017-05-30 19:50:48 +0800
commit8df24760d74176cb01559e581b140e52b18cdc62 (patch)
tree026364f131d03de4e1e96a73d32547bc14abe2d6
parent71814bf6c4382e2538b25653e2b41f4e76c56d0d (diff)
parentec1700600a96e493dd0fac2a182dc191eaf227a0 (diff)
downloadgo-tangerine-8df24760d74176cb01559e581b140e52b18cdc62.tar
go-tangerine-8df24760d74176cb01559e581b140e52b18cdc62.tar.gz
go-tangerine-8df24760d74176cb01559e581b140e52b18cdc62.tar.bz2
go-tangerine-8df24760d74176cb01559e581b140e52b18cdc62.tar.lz
go-tangerine-8df24760d74176cb01559e581b140e52b18cdc62.tar.xz
go-tangerine-8df24760d74176cb01559e581b140e52b18cdc62.tar.zst
go-tangerine-8df24760d74176cb01559e581b140e52b18cdc62.zip
Merge pull request #14553 from karalabe/puppeth-key-check
cmd/puppeth: fix improper key validation for remotes
-rw-r--r--cmd/puppeth/module_node.go2
-rw-r--r--cmd/puppeth/wizard_node.go3
2 files changed, 2 insertions, 3 deletions
diff --git a/cmd/puppeth/module_node.go b/cmd/puppeth/module_node.go
index 6372f60d2..ce1d34135 100644
--- a/cmd/puppeth/module_node.go
+++ b/cmd/puppeth/module_node.go
@@ -135,7 +135,7 @@ func deployNode(client *sshClient, network string, bootv4, bootv5 []string, conf
}
defer client.Run("rm -rf " + workdir)
- // Build and deploy the bootnode service
+ // Build and deploy the boot or seal node service
return nil, client.Stream(fmt.Sprintf("cd %s && docker-compose -p %s up -d --build", workdir, network))
}
diff --git a/cmd/puppeth/wizard_node.go b/cmd/puppeth/wizard_node.go
index 483d9fe05..05232486b 100644
--- a/cmd/puppeth/wizard_node.go
+++ b/cmd/puppeth/wizard_node.go
@@ -109,8 +109,7 @@ func (w *wizard) deployNode(boot bool) {
} else if w.conf.genesis.Config.Clique != nil {
// If a previous signer was already set, offer to reuse it
if infos.keyJSON != "" {
- var key keystore.Key
- if err := json.Unmarshal([]byte(infos.keyJSON), &key); err != nil {
+ if key, err := keystore.DecryptKey([]byte(infos.keyJSON), infos.keyPass); err != nil {
infos.keyJSON, infos.keyPass = "", ""
} else {
fmt.Println()