cnct: simplify channel arbitrator state logging

This commit is contained in:
Joost Jager 2020-03-12 17:34:55 +01:00
parent 3b517390d8
commit e8e99c6533
No known key found for this signature in database
GPG Key ID: A61B9D4C393C59C7

@ -850,28 +850,24 @@ func (c *ChannelArbitrator) stateStep(
// We are waiting for a commitment to be confirmed, so any
// other trigger will be ignored.
case chainTrigger, userTrigger:
log.Infof("ChannelArbitrator(%v): noop trigger %v",
c.cfg.ChanPoint, trigger)
nextState = StateCommitmentBroadcasted
// If this state advance was triggered by any of the
// commitments being confirmed, then we'll jump to the state
// where the contract has been closed.
case localCloseTrigger, remoteCloseTrigger:
log.Infof("ChannelArbitrator(%v): trigger %v, "+
" going to StateContractClosed",
c.cfg.ChanPoint, trigger)
nextState = StateContractClosed
// If a coop close or breach was confirmed, jump straight to
// the fully resolved state.
case coopCloseTrigger, breachCloseTrigger:
log.Infof("ChannelArbitrator(%v): trigger %v, "+
" going to StateFullyResolved",
c.cfg.ChanPoint, trigger)
nextState = StateFullyResolved
}
log.Infof("ChannelArbitrator(%v): trigger %v moving from "+
"state %v to %v", c.cfg.ChanPoint, trigger, c.state,
nextState)
// If we're in this state, then the contract has been fully closed to
// outside sub-systems, so we'll process the prior set of on-chain
// contract actions and launch a set of resolvers.