contractcourt: rename htlcResolvers to resolvers
This commit changes the name returned from `prepContractResolutions` from `htlcResolvers` to `resolvers` to avoid confusion as there are multiple types of resolvers returned.
This commit is contained in:
1 file changed
+6
-6
@@ -1090,10 +1090,10 @@ func (c *ChannelArbitrator) stateStep(
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now that we know we'll need to act, we'll process the htlc
|
// Now that we know we'll need to act, we'll process all the
|
||||||
// actions, then create the structures we need to resolve all
|
// resolvers, then create the structures we need to resolve all
|
||||||
// outstanding contracts.
|
// outstanding contracts.
|
||||||
htlcResolvers, pktsToSend, err := c.prepContractResolutions(
|
resolvers, pktsToSend, err := c.prepContractResolutions(
|
||||||
contractResolutions, triggerHeight, trigger,
|
contractResolutions, triggerHeight, trigger,
|
||||||
confCommitSet,
|
confCommitSet,
|
||||||
)
|
)
|
||||||
@@ -1120,16 +1120,16 @@ func (c *ChannelArbitrator) stateStep(
|
|||||||
}
|
}
|
||||||
|
|
||||||
log.Debugf("ChannelArbitrator(%v): inserting %v contract "+
|
log.Debugf("ChannelArbitrator(%v): inserting %v contract "+
|
||||||
"resolvers", c.cfg.ChanPoint, len(htlcResolvers))
|
"resolvers", c.cfg.ChanPoint, len(resolvers))
|
||||||
|
|
||||||
err = c.log.InsertUnresolvedContracts(nil, htlcResolvers...)
|
err = c.log.InsertUnresolvedContracts(nil, resolvers...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return StateError, closeTx, err
|
return StateError, closeTx, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finally, we'll launch all the required contract resolvers.
|
// Finally, we'll launch all the required contract resolvers.
|
||||||
// Once they're all resolved, we're no longer needed.
|
// Once they're all resolved, we're no longer needed.
|
||||||
c.launchResolvers(htlcResolvers)
|
c.launchResolvers(resolvers)
|
||||||
|
|
||||||
nextState = StateWaitingFullResolution
|
nextState = StateWaitingFullResolution
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user