From 2aa68a851742899dafce59d9541bd89a19597cbd Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Thu, 4 May 2017 17:04:35 -0700 Subject: [PATCH] breacharbiter: fix bug, properly populate ChannelCloseSummary --- breacharbiter.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/breacharbiter.go b/breacharbiter.go index 37f500182..6db6ee0c5 100644 --- a/breacharbiter.go +++ b/breacharbiter.go @@ -450,12 +450,15 @@ func (b *breachArbiter) breachObserver(contract *lnwallet.LightningChannel, // multi-hop HTLCs aren't sent over this link, nor any other // links associated with this peer. b.htlcSwitch.CloseLink(chanPoint, CloseBreach) + chanInfo := contract.StateSnapshot() closeInfo := &channeldb.ChannelCloseSummary{ ChanPoint: *chanPoint, ClosingTXID: breachInfo.BreachTransaction.TxHash(), - OurBalance: contract.StateSnapshot().LocalBalance, - IsPending: true, + RemotePub: &chanInfo.RemoteIdentity, + Capacity: chanInfo.Capacity, + OurBalance: chanInfo.LocalBalance, CloseType: channeldb.BreachClose, + IsPending: true, } if err := contract.DeleteState(closeInfo); err != nil { brarLog.Errorf("unable to delete channel state: %v", err)