mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
feat: accept conversation
This commit is contained in:
parent
7cb6ebf14d
commit
d96fe89963
2 changed files with 3 additions and 3 deletions
|
|
@ -312,8 +312,9 @@ func (ks *KeyStore) Unlock(a accounts.Account, passphrase string) error {
|
||||||
// Lock removes the private key with the given address from memory.
|
// Lock removes the private key with the given address from memory.
|
||||||
func (ks *KeyStore) Lock(addr common.Address) error {
|
func (ks *KeyStore) Lock(addr common.Address) error {
|
||||||
ks.mu.Lock()
|
ks.mu.Lock()
|
||||||
defer ks.mu.Unlock()
|
unl, found := ks.unlocked[addr]
|
||||||
if unl, found := ks.unlocked[addr]; found {
|
ks.mu.Unlock()
|
||||||
|
if found {
|
||||||
ks.expire(addr, unl, time.Duration(0)*time.Nanosecond)
|
ks.expire(addr, unl, time.Duration(0)*time.Nanosecond)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,6 @@ func TestHistoryImportAndExport(t *testing.T) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("error opening era file: %v", err)
|
t.Fatalf("error opening era file: %v", err)
|
||||||
}
|
}
|
||||||
defer f.Close()
|
|
||||||
var (
|
var (
|
||||||
h = sha256.New()
|
h = sha256.New()
|
||||||
buf = bytes.NewBuffer(nil)
|
buf = bytes.NewBuffer(nil)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue