diff options
author | Felix Lange <fjl@twurst.com> | 2016-11-11 13:13:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-11 13:13:16 +0800 |
commit | 9eb6f627fa9e08573580fc5915e23d332a36071b (patch) | |
tree | 711a6f608e074df8ab514f1e269dac457ddc1fdc /accounts | |
parent | 80ea44c485c42032aa954f2a8580e3afb4aa5339 (diff) | |
parent | 8247bccf71351812cd60179c3ef0f9d596f117c1 (diff) | |
download | dexon-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.go | 8 |
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 } |