Lock removes the private key with the given address from memory.
(addr common.Address)
| 320 | |
| 321 | // Lock removes the private key with the given address from memory. |
| 322 | func (ks *KeyStore) Lock(addr common.Address) error { |
| 323 | ks.mu.Lock() |
| 324 | if unl, found := ks.unlocked[addr]; found { |
| 325 | ks.mu.Unlock() |
| 326 | ks.expire(addr, unl, time.Duration(0)*time.Nanosecond) |
| 327 | } else { |
| 328 | ks.mu.Unlock() |
| 329 | } |
| 330 | return nil |
| 331 | } |
| 332 | |
| 333 | // TimedUnlock unlocks the given account with the passphrase. The account |
| 334 | // stays unlocked for the duration of timeout. A timeout of 0 unlocks the account |