breacharbiter: modify db API usage to match recent changes
This commit is contained in:
parent
36fe8a730e
commit
4f758eb549
@ -374,7 +374,14 @@ 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)
|
||||||
if err := contract.DeleteState(); err != nil {
|
closeInfo := &channeldb.ChannelCloseSummary{
|
||||||
|
ChanPoint: *chanPoint,
|
||||||
|
ClosingTXID: breachInfo.BreachTransaction.TxHash(),
|
||||||
|
OurBalance: contract.StateSnapshot().LocalBalance,
|
||||||
|
IsPending: true,
|
||||||
|
CloseType: channeldb.BreachClose,
|
||||||
|
}
|
||||||
|
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)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -432,7 +439,7 @@ func (b *breachArbiter) breachObserver(contract *lnwallet.LightningChannel,
|
|||||||
|
|
||||||
doneChan: make(chan struct{}),
|
doneChan: make(chan struct{}),
|
||||||
}
|
}
|
||||||
// TODO(roasbeef): delete chan state on unilateral close also?
|
|
||||||
case <-b.quit:
|
case <-b.quit:
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user