aboutsummaryrefslogtreecommitdiffstats
path: root/accounts
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-11-11 13:13:16 +0800
committerGitHub <noreply@github.com>2016-11-11 13:13:16 +0800
commit9eb6f627fa9e08573580fc5915e23d332a36071b (patch)
tree711a6f608e074df8ab514f1e269dac457ddc1fdc /accounts
parent80ea44c485c42032aa954f2a8580e3afb4aa5339 (diff)
parent8247bccf71351812cd60179c3ef0f9d596f117c1 (diff)
downloaddexon-9eb6f627fa9e08573580fc5915e23d332a36071b.tar.gz
dexon-9eb6f627fa9e08573580fc5915e23d332a36071b.tar.zst
dexon-9eb6f627fa9e08573580fc5915e23d332a36071b.zip
Merge pull request #3247 from fjl/bzzd
cmd: add swarm command line tools
Diffstat (limited to 'accounts')
-rw-r--r--accounts/account_manager.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/accounts/account_manager.go b/accounts/account_manager.go
index c8601c3c0..abe442388 100644
--- a/accounts/account_manager.go
+++ b/accounts/account_manager.go
@@ -228,11 +228,17 @@ func (am *Manager) TimedUnlock(a Account, passphrase string, timeout time.Durati
return nil
}
-func (am *Manager) getDecryptedKey(a Account, auth string) (Account, *Key, error) {
+// Find resolves the given account into a unique entry in the keystore.
+func (am *Manager) Find(a Account) (Account, error) {
am.cache.maybeReload()
am.cache.mu.Lock()
a, err := am.cache.find(a)
am.cache.mu.Unlock()
+ return a, err
+}
+
+func (am *Manager) getDecryptedKey(a Account, auth string) (Account, *Key, error) {
+ a, err := am.Find(a)
if err != nil {
return a, nil, err
}