From 2e1dcd316c0d5596f9441440e802516c1379237f Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Sat, 10 Mar 2018 17:28:17 -0800 Subject: [PATCH] lnwallet/wallet: store funding txn during reservation --- lnwallet/wallet.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lnwallet/wallet.go b/lnwallet/wallet.go index 0ad253fd..61f09c2f 100644 --- a/lnwallet/wallet.go +++ b/lnwallet/wallet.go @@ -1073,10 +1073,12 @@ func (l *LightningWallet) handleFundingCounterPartySigs(msg *addCounterPartySigs res.partialState.LocalChanCfg = res.ourContribution.toChanConfig() res.partialState.RemoteChanCfg = res.theirContribution.toChanConfig() + // We'll also record the finalized funding txn, which will allow us to + // rebroadcast on startup in case we fail. + res.partialState.FundingTxn = fundingTx + // Add the complete funding transaction to the DB, in its open bucket // which will be used for the lifetime of this channel. - // TODO(roasbeef): - // * attempt to retransmit funding transactions on re-start nodeAddr := res.nodeAddr err = res.partialState.SyncPending(nodeAddr, uint32(bestHeight)) if err != nil {