aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-06-26 19:03:46 +0800
committerGitHub <noreply@github.com>2017-06-26 19:03:46 +0800
commitc008176f9f492b6a783b8f7e08c08d91aa04e201 (patch)
tree4c0cdf22df7ec7a878c15b9e8f26c16f294b5965
parentfeb29327066d6076d1802cdc1492d43a39cec276 (diff)
parent5603eb911602c4527c6633c1ce2c3de65f8100fe (diff)
downloadgo-tangerine-c008176f9f492b6a783b8f7e08c08d91aa04e201.tar
go-tangerine-c008176f9f492b6a783b8f7e08c08d91aa04e201.tar.gz
go-tangerine-c008176f9f492b6a783b8f7e08c08d91aa04e201.tar.bz2
go-tangerine-c008176f9f492b6a783b8f7e08c08d91aa04e201.tar.lz
go-tangerine-c008176f9f492b6a783b8f7e08c08d91aa04e201.tar.xz
go-tangerine-c008176f9f492b6a783b8f7e08c08d91aa04e201.tar.zst
go-tangerine-c008176f9f492b6a783b8f7e08c08d91aa04e201.zip
Merge pull request #14690 from karalabe/faucet-key-reuse
cmd/puppeth: fix key reuse during faucet deploys
-rw-r--r--cmd/puppeth/wizard_faucet.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd/puppeth/wizard_faucet.go b/cmd/puppeth/wizard_faucet.go
index 66ec98c73..51c4e2f7f 100644
--- a/cmd/puppeth/wizard_faucet.go
+++ b/cmd/puppeth/wizard_faucet.go
@@ -165,8 +165,7 @@ func (w *wizard) deployFaucet() {
}
// Load up the credential needed to release funds
if infos.node.keyJSON != "" {
- var key keystore.Key
- if err := json.Unmarshal([]byte(infos.node.keyJSON), &key); err != nil {
+ if key, err := keystore.DecryptKey([]byte(infos.node.keyJSON), infos.node.keyPass); err != nil {
infos.node.keyJSON, infos.node.keyPass = "", ""
} else {
fmt.Println()