breacharbiter: fix bug, properly populate ChannelCloseSummary
This commit is contained in:
parent
f335250512
commit
2aa68a8517
@ -450,12 +450,15 @@ func (b *breachArbiter) breachObserver(contract *lnwallet.LightningChannel,
|
|||||||
// multi-hop HTLCs aren't sent over this link, nor any other
|
// multi-hop HTLCs aren't sent over this link, nor any other
|
||||||
// links associated with this peer.
|
// links associated with this peer.
|
||||||
b.htlcSwitch.CloseLink(chanPoint, CloseBreach)
|
b.htlcSwitch.CloseLink(chanPoint, CloseBreach)
|
||||||
|
chanInfo := contract.StateSnapshot()
|
||||||
closeInfo := &channeldb.ChannelCloseSummary{
|
closeInfo := &channeldb.ChannelCloseSummary{
|
||||||
ChanPoint: *chanPoint,
|
ChanPoint: *chanPoint,
|
||||||
ClosingTXID: breachInfo.BreachTransaction.TxHash(),
|
ClosingTXID: breachInfo.BreachTransaction.TxHash(),
|
||||||
OurBalance: contract.StateSnapshot().LocalBalance,
|
RemotePub: &chanInfo.RemoteIdentity,
|
||||||
IsPending: true,
|
Capacity: chanInfo.Capacity,
|
||||||
|
OurBalance: chanInfo.LocalBalance,
|
||||||
CloseType: channeldb.BreachClose,
|
CloseType: channeldb.BreachClose,
|
||||||
|
IsPending: true,
|
||||||
}
|
}
|
||||||
if err := contract.DeleteState(closeInfo); err != nil {
|
if err := contract.DeleteState(closeInfo); err != nil {
|
||||||
brarLog.Errorf("unable to delete channel state: %v", err)
|
brarLog.Errorf("unable to delete channel state: %v", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user