mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
tweak keystore
This commit is contained in:
parent
d4b81f0e08
commit
9d02933c65
2 changed files with 5 additions and 2 deletions
|
|
@ -220,7 +220,10 @@ func (ac *accountCache) maybeReload() {
|
||||||
ac.watcher.start()
|
ac.watcher.start()
|
||||||
ac.throttle.Reset(minReloadInterval)
|
ac.throttle.Reset(minReloadInterval)
|
||||||
ac.mu.Unlock()
|
ac.mu.Unlock()
|
||||||
ac.scanAccounts()
|
err := ac.scanAccounts()
|
||||||
|
if err != nil {
|
||||||
|
log.Debug("failed to scan accounts", "err", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ac *accountCache) close() {
|
func (ac *accountCache) close() {
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ func (ks *KeyStore) init(keydir string) {
|
||||||
ks.unlocked = make(map[common.Address]*unlocked)
|
ks.unlocked = make(map[common.Address]*unlocked)
|
||||||
ks.cache, ks.changes = newAccountCache(keydir)
|
ks.cache, ks.changes = newAccountCache(keydir)
|
||||||
|
|
||||||
// TODO: In order for this finalizer to work, there must be no references
|
// NOTE: In order for this finalizer to work, there must be no references
|
||||||
// to ks. addressCache doesn't keep a reference but unlocked keys do,
|
// to ks. addressCache doesn't keep a reference but unlocked keys do,
|
||||||
// so the finalizer will not trigger until all timed unlocks have expired.
|
// so the finalizer will not trigger until all timed unlocks have expired.
|
||||||
runtime.SetFinalizer(ks, func(m *KeyStore) {
|
runtime.SetFinalizer(ks, func(m *KeyStore) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue