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
@ -1378,17 +1378,6 @@ func (c *ChannelArbitrator) channelAttendant(bestHeight int32,
|
|||||||
CommitResolution: uniClosure.CommitResolution,
|
CommitResolution: uniClosure.CommitResolution,
|
||||||
HtlcResolutions: *uniClosure.HtlcResolutions,
|
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
|
// TODO(roasbeef): modify signal to also detect
|
||||||
// cooperative closures?
|
// cooperative closures?
|
||||||
|
Loading…
Reference in New Issue
Block a user