Issue : Give the correct error when wallet is locked

When sending coins to an address with a wallet that's both
locked and has insufficient funds, the correct ErrWalletLocked
error will be returned.
This commit is contained in:
Jimmy Song 2014-03-20 11:21:52 -05:00 committed by Josh Rickmar
parent c9ff0531f9
commit e22d221ea8
2 changed files with 7 additions and 0 deletions

View file

@ -1770,7 +1770,9 @@ func WalletPassphrase(icmd btcjson.Cmd) (interface{}, *btcjson.Error) {
go func(timeout int64) {
time.Sleep(time.Second * time.Duration(timeout))
AcctMgr.Grab()
_ = AcctMgr.LockWallets()
AcctMgr.Release()
}(cmd.Timeout)
return nil, nil