lnwallet: don't ignore any returned error from PublishTransaction

This commit is contained in:
Johan T. Halseth committed 2018-02-14 12:34:41 +01:00
1 parent 7aaa15b8b5
commit 3fd7f28b39
1 file changed
+3 -7
+3 -7
View File
@@ -5,7 +5,6 @@ import (
"crypto/sha256" "crypto/sha256"
"fmt" "fmt"
"net" "net"
"strings"
"sync" "sync"
"sync/atomic" "sync/atomic"
@@ -1114,12 +1113,9 @@ func (l *LightningWallet) handleFundingCounterPartySigs(msg *addCounterPartySigs
// Broadcast the finalized funding transaction to the network. // Broadcast the finalized funding transaction to the network.
if err := l.PublishTransaction(fundingTx); err != nil { if err := l.PublishTransaction(fundingTx); err != nil {
// TODO(roasbeef): need to make this into a concrete error msg.err <- err
if !strings.Contains(err.Error(), "already have") { msg.completeChan <- nil
msg.err <- err return
msg.completeChan <- nil
return
}
} }
msg.completeChan <- res.partialState msg.completeChan <- res.partialState