mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 22:25:24 +01:00
contractcourt: remove unecessary contractRes check
This commit removes a short circuit checking if the contract resolver after a unilateral close is empty. After removing this, the state machine will advance the state from StateDefault->ContractClosed, in which the stateCallback will be called, logging the state needed to advance. Since this logged state is empty, the state machine will go directly to StateFullyResolved, which will trigger the MarkChannelResolved call. This means the behaviour is kept.
This commit is contained in:
parent
3347431923
commit
9b9fada675
1 changed files with 0 additions and 11 deletions
|
@ -1378,17 +1378,6 @@ func (c *ChannelArbitrator) channelAttendant(bestHeight int32,
|
|||
CommitResolution: uniClosure.CommitResolution,
|
||||
HtlcResolutions: *uniClosure.HtlcResolutions,
|
||||
}
|
||||
if contractRes.IsEmpty() {
|
||||
log.Infof("ChannelArbitrator(%v): contract "+
|
||||
"resolutions empty, exiting", c.cfg.ChanPoint)
|
||||
|
||||
err := c.cfg.MarkChannelResolved()
|
||||
if err != nil {
|
||||
log.Errorf("unable to resolve "+
|
||||
"contract: %v", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// TODO(roasbeef): modify signal to also detect
|
||||
// cooperative closures?
|
||||
|
|
Loading…
Add table
Reference in a new issue