breacharbiter: check ErrDoubleSpend from PublishTransaction

This commit is contained in:
Johan T. Halseth 2018-02-14 12:28:19 +01:00
parent 2ae1b7dbbe
commit cabc07ea7d
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

@ -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