feat: accept conversation

This commit is contained in:
songzhibin97 2024-04-23 16:44:31 +08:00
parent 7cb6ebf14d
commit d96fe89963
2 changed files with 3 additions and 3 deletions

View file

@ -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.
func (ks *KeyStore) Lock(addr common.Address) error {
ks.mu.Lock()
defer ks.mu.Unlock()
if unl, found := ks.unlocked[addr]; found {
unl, found := ks.unlocked[addr]
ks.mu.Unlock()
if found {
ks.expire(addr, unl, time.Duration(0)*time.Nanosecond)
}
return nil

View file

@ -113,7 +113,6 @@ func TestHistoryImportAndExport(t *testing.T) {
if err != nil {
t.Fatalf("error opening era file: %v", err)
}
defer f.Close()
var (
h = sha256.New()
buf = bytes.NewBuffer(nil)