mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 14:40:51 +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:
@@ -122,16 +122,18 @@ func newOutgoingResolverTestContext(t *testing.T) *outgoingResolverTestContext {
|
||||
},
|
||||
}
|
||||
|
||||
cfg := ResolverConfig{
|
||||
ChannelArbitratorConfig: chainCfg,
|
||||
Checkpoint: func(_ ContractResolver) error {
|
||||
checkPointChan <- struct{}{}
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
resolver := &htlcOutgoingContestResolver{
|
||||
htlcTimeoutResolver: htlcTimeoutResolver{
|
||||
ResolverKit: ResolverKit{
|
||||
ChannelArbitratorConfig: chainCfg,
|
||||
Checkpoint: func(_ ContractResolver) error {
|
||||
checkPointChan <- struct{}{}
|
||||
return nil
|
||||
},
|
||||
},
|
||||
htlcResolution: outgoingRes,
|
||||
contractResolverKit: *newContractResolverKit(cfg),
|
||||
htlcResolution: outgoingRes,
|
||||
},
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user