diff --git a/fundingmanager.go b/fundingmanager.go index 9ea12d46..da51572b 100644 --- a/fundingmanager.go +++ b/fundingmanager.go @@ -392,6 +392,7 @@ func (f *fundingManager) Start() error { // to confirm, so we forget the channel and // delete it from the database. closeInfo := &channeldb.ChannelCloseSummary{ + ChainHash: ch.ChainHash, ChanPoint: ch.FundingOutpoint, RemotePub: ch.IdentityPub, CloseType: channeldb.FundingCanceled, @@ -668,8 +669,8 @@ func (f *fundingManager) handlePendingChannels(msg *pendingChansReq) { identityPub: dbPendingChan.IdentityPub, channelPoint: &dbPendingChan.FundingOutpoint, capacity: dbPendingChan.Capacity, - localBalance: dbPendingChan.LocalBalance.ToSatoshis(), - remoteBalance: dbPendingChan.RemoteBalance.ToSatoshis(), + localBalance: dbPendingChan.LocalCommitment.LocalBalance.ToSatoshis(), + remoteBalance: dbPendingChan.LocalCommitment.RemoteBalance.ToSatoshis(), } pendingChannels = append(pendingChannels, pendingChan) @@ -1073,6 +1074,7 @@ func (f *fundingManager) handleFundingCreated(fmsg *fundingCreatedMsg) { deleteFromDatabase := func() { closeInfo := &channeldb.ChannelCloseSummary{ ChanPoint: completeChan.FundingOutpoint, + ChainHash: completeChan.ChainHash, RemotePub: completeChan.IdentityPub, CloseType: channeldb.FundingCanceled, } @@ -1461,9 +1463,7 @@ func (f *fundingManager) waitForFundingConfirmation(completeChan *channeldb.Open // Now that the channel has been fully confirmed, we'll mark it as open // within the database. - completeChan.IsPending = false - err = f.cfg.Wallet.Cfg.Database.MarkChannelAsOpen(&fundingPoint, shortChanID) - if err != nil { + if err := completeChan.MarkAsOpen(shortChanID); err != nil { fndgLog.Errorf("error setting channel pending flag to false: "+ "%v", err) return