From c37c9db2de862df7413f1e649c556823da5f5a5c Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Mon, 13 Aug 2018 19:16:47 -0700 Subject: [PATCH] funding: properly set auxiliary channel recovery info in close chan summaries --- fundingmanager.go | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/fundingmanager.go b/fundingmanager.go index 3fcce0a3c..4df62b32d 100644 --- a/fundingmanager.go +++ b/fundingmanager.go @@ -523,10 +523,15 @@ func (f *fundingManager) Start() error { // initiator. closeInfo := &channeldb.ChannelCloseSummary{ - ChainHash: ch.ChainHash, - ChanPoint: ch.FundingOutpoint, - RemotePub: ch.IdentityPub, - CloseType: channeldb.FundingCanceled, + ChainHash: ch.ChainHash, + ChanPoint: ch.FundingOutpoint, + RemotePub: ch.IdentityPub, + Capacity: ch.Capacity, + SettledBalance: ch.LocalBalance, + CloseType: channeldb.FundingCanceled, + RemoteCurrentRevocation: ch.RemoteCurrentRevocation, + RemoteNextRevocation: ch.RemoteNextRevocation, + LocalChanConfig: ch.LocalChanCfg, } if err := ch.CloseChannel(closeInfo); err != nil { @@ -1372,10 +1377,15 @@ func (f *fundingManager) handleFundingCreated(fmsg *fundingCreatedMsg) { // from the database. deleteFromDatabase := func() { closeInfo := &channeldb.ChannelCloseSummary{ - ChanPoint: completeChan.FundingOutpoint, - ChainHash: completeChan.ChainHash, - RemotePub: completeChan.IdentityPub, - CloseType: channeldb.FundingCanceled, + ChanPoint: completeChan.FundingOutpoint, + ChainHash: completeChan.ChainHash, + RemotePub: completeChan.IdentityPub, + CloseType: channeldb.FundingCanceled, + Capacity: completeChan.Capacity, + SettledBalance: completeChan.LocalBalance, + RemoteCurrentRevocation: completeChan.RemoteCurrentRevocation, + RemoteNextRevocation: completeChan.RemoteNextRevocation, + LocalChanConfig: completeChan.LocalChanCfg, } if err := completeChan.CloseChannel(closeInfo); err != nil {