aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth/js.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-03-03 08:09:16 +0800
committerFelix Lange <fjl@twurst.com>2016-04-12 21:58:01 +0800
commit46e8940b19fee9bc21767a1341c382fd9c9d572a (patch)
tree384b700810910857cd40e099aba0d5a525eec066 /cmd/geth/js.go
parent2dc20963e789c85bcc9170e15c0483e51ca42bfc (diff)
downloaddexon-46e8940b19fee9bc21767a1341c382fd9c9d572a.tar
dexon-46e8940b19fee9bc21767a1341c382fd9c9d572a.tar.gz
dexon-46e8940b19fee9bc21767a1341c382fd9c9d572a.tar.bz2
dexon-46e8940b19fee9bc21767a1341c382fd9c9d572a.tar.lz
dexon-46e8940b19fee9bc21767a1341c382fd9c9d572a.tar.xz
dexon-46e8940b19fee9bc21767a1341c382fd9c9d572a.tar.zst
dexon-46e8940b19fee9bc21767a1341c382fd9c9d572a.zip
accounts: streamline API
- Manager.Accounts no longer returns an error. - Manager methods take Account instead of common.Address. - All uses of Account with unkeyed fields are converted.
Diffstat (limited to 'cmd/geth/js.go')
-rw-r--r--cmd/geth/js.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/geth/js.go b/cmd/geth/js.go
index 5178465d1..d5518f94b 100644
--- a/cmd/geth/js.go
+++ b/cmd/geth/js.go
@@ -27,6 +27,7 @@ import (
"strings"
"github.com/codegangsta/cli"
+ "github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/registrar"
@@ -281,7 +282,8 @@ func (self *jsre) UnlockAccount(addr []byte) bool {
if err := self.stack.Service(&ethereum); err != nil {
return false
}
- if err := ethereum.AccountManager().Unlock(common.BytesToAddress(addr), pass); err != nil {
+ a := accounts.Account{Address: common.BytesToAddress(addr)}
+ if err := ethereum.AccountManager().Unlock(a, pass); err != nil {
return false
} else {
fmt.Println("Account is now unlocked for this session.")