mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-09 23:23:01 +02:00
contractcourt: add debug logs for unresolved contracts
This commit is contained in:
@@ -1132,19 +1132,27 @@ func (c *ChannelArbitrator) stateStep(
|
|||||||
log.Infof("ChannelArbitrator(%v): still awaiting contract "+
|
log.Infof("ChannelArbitrator(%v): still awaiting contract "+
|
||||||
"resolution", c.cfg.ChanPoint)
|
"resolution", c.cfg.ChanPoint)
|
||||||
|
|
||||||
numUnresolved, err := c.log.FetchUnresolvedContracts()
|
unresolved, err := c.log.FetchUnresolvedContracts()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return StateError, closeTx, err
|
return StateError, closeTx, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we still have unresolved contracts, then we'll stay alive
|
// If we have no unresolved contracts, then we can move to the
|
||||||
// to oversee their resolution.
|
// final state.
|
||||||
if len(numUnresolved) != 0 {
|
if len(unresolved) == 0 {
|
||||||
nextState = StateWaitingFullResolution
|
nextState = StateFullyResolved
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
nextState = StateFullyResolved
|
// Otherwise we still have unresolved contracts, then we'll
|
||||||
|
// stay alive to oversee their resolution.
|
||||||
|
nextState = StateWaitingFullResolution
|
||||||
|
|
||||||
|
// Add debug logs.
|
||||||
|
for _, r := range unresolved {
|
||||||
|
log.Debugf("ChannelArbitrator(%v): still have "+
|
||||||
|
"unresolved contract: %T", c.cfg.ChanPoint, r)
|
||||||
|
}
|
||||||
|
|
||||||
// If we start as fully resolved, then we'll end as fully resolved.
|
// If we start as fully resolved, then we'll end as fully resolved.
|
||||||
case StateFullyResolved:
|
case StateFullyResolved:
|
||||||
|
Reference in New Issue
Block a user