From cabc07ea7d8e49e05edb9baa619ed767a2257c45 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Wed, 14 Feb 2018 12:28:19 +0100 Subject: [PATCH] breacharbiter: check ErrDoubleSpend from PublishTransaction --- breacharbiter.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/breacharbiter.go b/breacharbiter.go index 0093fb41..1771b81f 100644 --- a/breacharbiter.go +++ b/breacharbiter.go @@ -5,7 +5,6 @@ import ( "encoding/binary" "errors" "io" - "strings" "sync" "sync/atomic" @@ -580,7 +579,7 @@ secondLevelCheck: if err != nil { brarLog.Errorf("unable to broadcast "+ "justice tx: %v", err) - if strings.Contains(err.Error(), "already been spent") { + if err == lnwallet.ErrDoubleSpend { brarLog.Infof("Attempting to transfer HTLC revocations " + "to the second level") finalTx = nil