From 620be5821f0cb0694fc335df0097b69bd04e6b08 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Wed, 18 Apr 2018 18:34:48 -0700 Subject: [PATCH] wallet: ensure PublishTransaction handles nil error case --- wallet/wallet.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wallet/wallet.go b/wallet/wallet.go index efd12a5..0357254 100644 --- a/wallet/wallet.go +++ b/wallet/wallet.go @@ -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