mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 01:43:16 +01:00
cnct: unexport ResolverKit quit field
This commit is contained in:
parent
ee14eaec5f
commit
75ecbfd321
@ -516,7 +516,7 @@ func (b *boltArbitratorLog) FetchUnresolvedContracts() ([]ContractResolver, erro
|
||||
return fmt.Errorf("unknown resolver type: %v", resType)
|
||||
}
|
||||
|
||||
resKit.Quit = make(chan struct{})
|
||||
resKit.quit = make(chan struct{})
|
||||
res.AttachResolverKit(resKit)
|
||||
contracts = append(contracts, res)
|
||||
return nil
|
||||
|
@ -1733,7 +1733,7 @@ func (c *ChannelArbitrator) prepContractResolutions(
|
||||
continue
|
||||
}
|
||||
|
||||
resKit.Quit = make(chan struct{})
|
||||
resKit.quit = make(chan struct{})
|
||||
resolver := &htlcSuccessResolver{
|
||||
htlcResolution: resolution,
|
||||
broadcastHeight: height,
|
||||
@ -1761,7 +1761,7 @@ func (c *ChannelArbitrator) prepContractResolutions(
|
||||
continue
|
||||
}
|
||||
|
||||
resKit.Quit = make(chan struct{})
|
||||
resKit.quit = make(chan struct{})
|
||||
resolver := &htlcTimeoutResolver{
|
||||
htlcResolution: resolution,
|
||||
broadcastHeight: height,
|
||||
@ -1798,7 +1798,7 @@ func (c *ChannelArbitrator) prepContractResolutions(
|
||||
ChanID: c.cfg.ShortChanID,
|
||||
}
|
||||
|
||||
resKit.Quit = make(chan struct{})
|
||||
resKit.quit = make(chan struct{})
|
||||
resolver := &htlcIncomingContestResolver{
|
||||
htlcExpiry: htlc.RefundTimeout,
|
||||
circuitKey: circuitKey,
|
||||
@ -1831,7 +1831,7 @@ func (c *ChannelArbitrator) prepContractResolutions(
|
||||
continue
|
||||
}
|
||||
|
||||
resKit.Quit = make(chan struct{})
|
||||
resKit.quit = make(chan struct{})
|
||||
resolver := &htlcOutgoingContestResolver{
|
||||
htlcTimeoutResolver: htlcTimeoutResolver{
|
||||
htlcResolution: resolution,
|
||||
@ -1850,7 +1850,7 @@ func (c *ChannelArbitrator) prepContractResolutions(
|
||||
// a resolver to sweep our commitment output (but only if it wasn't
|
||||
// trimmed).
|
||||
if contractResolutions.CommitResolution != nil {
|
||||
resKit.Quit = make(chan struct{})
|
||||
resKit.quit = make(chan struct{})
|
||||
resolver := &commitSweepResolver{
|
||||
commitResolution: *contractResolutions.CommitResolution,
|
||||
broadcastHeight: height,
|
||||
|
@ -80,7 +80,7 @@ func (c *commitSweepResolver) Resolve() (ContractResolver, error) {
|
||||
return nil, errResolverShuttingDown
|
||||
}
|
||||
|
||||
case <-c.Quit:
|
||||
case <-c.quit:
|
||||
return nil, errResolverShuttingDown
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ func (c *commitSweepResolver) Resolve() (ContractResolver, error) {
|
||||
|
||||
log.Infof("ChannelPoint(%v) commit tx is fully resolved by "+
|
||||
"sweep tx: %v", c.chanPoint, sweepResult.Tx.TxHash())
|
||||
case <-c.Quit:
|
||||
case <-c.quit:
|
||||
return nil, errResolverShuttingDown
|
||||
}
|
||||
|
||||
@ -180,7 +180,7 @@ func (c *commitSweepResolver) Resolve() (ContractResolver, error) {
|
||||
log.Errorf("unable to Checkpoint: %v", err)
|
||||
return nil, err
|
||||
}
|
||||
case <-c.Quit:
|
||||
case <-c.quit:
|
||||
return nil, errResolverShuttingDown
|
||||
}
|
||||
|
||||
@ -206,7 +206,7 @@ func (c *commitSweepResolver) Resolve() (ContractResolver, error) {
|
||||
log.Infof("ChannelPoint(%v) commit tx is fully resolved, at height: %v",
|
||||
c.chanPoint, confInfo.BlockHeight)
|
||||
|
||||
case <-c.Quit:
|
||||
case <-c.quit:
|
||||
return nil, errResolverShuttingDown
|
||||
}
|
||||
|
||||
@ -221,7 +221,7 @@ func (c *commitSweepResolver) Resolve() (ContractResolver, error) {
|
||||
//
|
||||
// NOTE: Part of the ContractResolver interface.
|
||||
func (c *commitSweepResolver) Stop() {
|
||||
close(c.Quit)
|
||||
close(c.quit)
|
||||
}
|
||||
|
||||
// IsResolved returns true if the stored state in the resolve is fully
|
||||
|
@ -77,7 +77,7 @@ type ResolverKit struct {
|
||||
// return a non-nil error upon success.
|
||||
Checkpoint func(ContractResolver) error
|
||||
|
||||
Quit chan struct{}
|
||||
quit chan struct{}
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -68,7 +68,7 @@ func (h *htlcIncomingContestResolver) Resolve() (ContractResolver, error) {
|
||||
return nil, errResolverShuttingDown
|
||||
}
|
||||
currentHeight = newBlock.Height
|
||||
case <-h.Quit:
|
||||
case <-h.quit:
|
||||
return nil, errResolverShuttingDown
|
||||
}
|
||||
|
||||
@ -239,7 +239,7 @@ func (h *htlcIncomingContestResolver) Resolve() (ContractResolver, error) {
|
||||
return nil, h.Checkpoint(h)
|
||||
}
|
||||
|
||||
case <-h.Quit:
|
||||
case <-h.quit:
|
||||
return nil, errResolverShuttingDown
|
||||
}
|
||||
}
|
||||
@ -271,7 +271,7 @@ func (h *htlcIncomingContestResolver) report() *ContractReport {
|
||||
//
|
||||
// NOTE: Part of the ContractResolver interface.
|
||||
func (h *htlcIncomingContestResolver) Stop() {
|
||||
close(h.Quit)
|
||||
close(h.quit)
|
||||
}
|
||||
|
||||
// IsResolved returns true if the stored state in the resolve is fully
|
||||
|
@ -130,7 +130,7 @@ func (h *htlcOutgoingContestResolver) Resolve() (ContractResolver, error) {
|
||||
// claimed.
|
||||
return h.claimCleanUp(commitSpend)
|
||||
|
||||
case <-h.Quit:
|
||||
case <-h.quit:
|
||||
return nil, fmt.Errorf("resolver canceled")
|
||||
}
|
||||
}
|
||||
@ -162,7 +162,7 @@ func (h *htlcOutgoingContestResolver) report() *ContractReport {
|
||||
//
|
||||
// NOTE: Part of the ContractResolver interface.
|
||||
func (h *htlcOutgoingContestResolver) Stop() {
|
||||
close(h.Quit)
|
||||
close(h.quit)
|
||||
}
|
||||
|
||||
// IsResolved returns true if the stored state in the resolve is fully
|
||||
|
@ -173,7 +173,7 @@ func (h *htlcSuccessResolver) Resolve() (ContractResolver, error) {
|
||||
return nil, errResolverShuttingDown
|
||||
}
|
||||
|
||||
case <-h.Quit:
|
||||
case <-h.quit:
|
||||
return nil, errResolverShuttingDown
|
||||
}
|
||||
|
||||
@ -238,7 +238,7 @@ func (h *htlcSuccessResolver) Resolve() (ContractResolver, error) {
|
||||
return nil, errResolverShuttingDown
|
||||
}
|
||||
|
||||
case <-h.Quit:
|
||||
case <-h.quit:
|
||||
return nil, errResolverShuttingDown
|
||||
}
|
||||
|
||||
@ -251,7 +251,7 @@ func (h *htlcSuccessResolver) Resolve() (ContractResolver, error) {
|
||||
//
|
||||
// NOTE: Part of the ContractResolver interface.
|
||||
func (h *htlcSuccessResolver) Stop() {
|
||||
close(h.Quit)
|
||||
close(h.quit)
|
||||
}
|
||||
|
||||
// IsResolved returns true if the stored state in the resolve is fully
|
||||
|
@ -274,7 +274,7 @@ func (h *htlcTimeoutResolver) Resolve() (ContractResolver, error) {
|
||||
return errResolverShuttingDown
|
||||
}
|
||||
|
||||
case <-h.Quit:
|
||||
case <-h.quit:
|
||||
return errResolverShuttingDown
|
||||
}
|
||||
|
||||
@ -312,7 +312,7 @@ func (h *htlcTimeoutResolver) Resolve() (ContractResolver, error) {
|
||||
return nil, errResolverShuttingDown
|
||||
}
|
||||
|
||||
case <-h.Quit:
|
||||
case <-h.quit:
|
||||
return nil, errResolverShuttingDown
|
||||
}
|
||||
|
||||
@ -365,7 +365,7 @@ func (h *htlcTimeoutResolver) Resolve() (ContractResolver, error) {
|
||||
//
|
||||
// NOTE: Part of the ContractResolver interface.
|
||||
func (h *htlcTimeoutResolver) Stop() {
|
||||
close(h.Quit)
|
||||
close(h.quit)
|
||||
}
|
||||
|
||||
// IsResolved returns true if the stored state in the resolve is fully
|
||||
|
Loading…
Reference in New Issue
Block a user