mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 07:35:07 +02:00
cnct: instantiate quit channels inside resolvers
Removes a bug-prone construction that existed previously where the quit channel was replaced just-in-time.
This commit is contained in:
@@ -440,7 +440,7 @@ func (b *boltArbitratorLog) CommitState(s ArbitratorState) error {
|
||||
//
|
||||
// NOTE: Part of the ContractResolver interface.
|
||||
func (b *boltArbitratorLog) FetchUnresolvedContracts() ([]ContractResolver, error) {
|
||||
resKit := ResolverKit{
|
||||
resolverCfg := ResolverConfig{
|
||||
ChannelArbitratorConfig: b.cfg,
|
||||
Checkpoint: b.checkpointContract,
|
||||
}
|
||||
@@ -516,8 +516,7 @@ func (b *boltArbitratorLog) FetchUnresolvedContracts() ([]ContractResolver, erro
|
||||
return fmt.Errorf("unknown resolver type: %v", resType)
|
||||
}
|
||||
|
||||
resKit.quit = make(chan struct{})
|
||||
res.AttachResolverKit(resKit)
|
||||
res.AttachConfig(resolverCfg)
|
||||
contracts = append(contracts, res)
|
||||
return nil
|
||||
})
|
||||
|
Reference in New Issue
Block a user