wallet: ensure PublishTransaction handles nil error case
This commit is contained in:
parent
fbfca5f4ae
commit
620be5821f
1 changed files with 3 additions and 0 deletions
|
@ -2728,6 +2728,9 @@ func (w *Wallet) PublishTransaction(tx *wire.MsgTx) error {
|
|||
|
||||
_, err = server.SendRawTransaction(tx, false)
|
||||
switch {
|
||||
case err == nil:
|
||||
return nil
|
||||
|
||||
// The following are errors returned from btcd's mempool.
|
||||
case strings.Contains(err.Error(), "spent"):
|
||||
fallthrough
|
||||
|
|
Loading…
Reference in a new issue