diff --git a/fundingmanager.go b/fundingmanager.go index 05e028d1..3b812e63 100644 --- a/fundingmanager.go +++ b/fundingmanager.go @@ -684,13 +684,16 @@ func (f *fundingManager) failFundingFlow(peer *btcec.PublicKey, fndgLog.Errorf("Failing funding flow: %v", spew.Sdump(errMsg)) + if _, err := f.cancelReservationCtx(peer, tempChanID); err != nil { + fndgLog.Errorf("unable to cancel reservation: %v", err) + } + err := f.cfg.SendToPeer(peer, errMsg) if err != nil { fndgLog.Errorf("unable to send error message to peer %v", err) return } - f.cancelReservationCtx(peer, tempChanID) return } diff --git a/lnwallet/wallet.go b/lnwallet/wallet.go index 63bf1d09..c80af1ef 100644 --- a/lnwallet/wallet.go +++ b/lnwallet/wallet.go @@ -807,6 +807,9 @@ func (l *LightningWallet) handleContributionMsg(req *addContributionMsg) { fundingOutpoint := wire.NewOutPoint(&fundingTxID, multiSigIndex) pendingReservation.partialState.FundingOutpoint = *fundingOutpoint + walletLog.Debugf("Funding tx for ChannelPoint(%v) generated: %v", + fundingOutpoint, spew.Sdump(fundingTx)) + // Initialize an empty sha-chain for them, tracking the current pending // revocation hash (we don't yet know the preimage so we can't add it // to the chain). @@ -879,6 +882,11 @@ func (l *LightningWallet) handleContributionMsg(req *addContributionMsg) { txsort.InPlaceSort(ourCommitTx) txsort.InPlaceSort(theirCommitTx) + walletLog.Debugf("Local commit tx for ChannelPoint(%v): %v", + fundingOutpoint, spew.Sdump(ourCommitTx)) + walletLog.Debugf("Remote commit tx for ChannelPoint(%v): %v", + fundingOutpoint, spew.Sdump(theirCommitTx)) + // Record newly available information within the open channel state. chanState.FundingOutpoint = *fundingOutpoint chanState.LocalCommitment.CommitTx = ourCommitTx @@ -1181,6 +1189,11 @@ func (l *LightningWallet) handleSingleFunderSigs(req *addSingleFunderSigsMsg) { chanState.LocalCommitment.CommitTx = ourCommitTx chanState.RemoteCommitment.CommitTx = theirCommitTx + walletLog.Debugf("Local commit tx for ChannelPoint(%v): %v", + req.fundingOutpoint, spew.Sdump(ourCommitTx)) + walletLog.Debugf("Remote commit tx for ChannelPoint(%v): %v", + req.fundingOutpoint, spew.Sdump(theirCommitTx)) + channelValue := int64(pendingReservation.partialState.Capacity) hashCache := txscript.NewTxSigHashes(ourCommitTx) theirKey := pendingReservation.theirContribution.MultiSigKey