Log wallet locks and unlocks.

Fixes #392.
This commit is contained in:
Josh Rickmar 2016-03-11 16:22:43 -05:00
parent 6cf22b7944
commit 6e6cb307fa

View file

@ -498,6 +498,11 @@ out:
continue continue
} }
timeout = req.lockAfter timeout = req.lockAfter
if timeout == nil {
log.Info("Wallet unlocked without timeout")
} else {
log.Info("Wallet temporarily unlocked")
}
req.err <- nil req.err <- nil
continue continue
@ -544,6 +549,8 @@ out:
err := w.Manager.Lock() err := w.Manager.Lock()
if err != nil && !waddrmgr.IsError(err, waddrmgr.ErrLocked) { if err != nil && !waddrmgr.IsError(err, waddrmgr.ErrLocked) {
log.Errorf("Could not lock wallet: %v", err) log.Errorf("Could not lock wallet: %v", err)
} else {
log.Info("Wallet locked")
} }
} }
w.wg.Done() w.wg.Done()