htlcswitch: add InterceptableSwitchConfig

Preparation for adding more config options.
This commit is contained in:
Joost Jager
2022-08-15 13:00:08 +02:00
parent 4fbd608b73
commit 4a3e90f4d0
4 changed files with 43 additions and 12 deletions

View File

@ -667,8 +667,11 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
return nil, err
}
s.interceptableSwitch = htlcswitch.NewInterceptableSwitch(
s.htlcSwitch, lncfg.DefaultFinalCltvRejectDelta,
s.cfg.RequireInterceptor,
&htlcswitch.InterceptableSwitchConfig{
Switch: s.htlcSwitch,
CltvRejectDelta: lncfg.DefaultFinalCltvRejectDelta,
RequireInterceptor: s.cfg.RequireInterceptor,
},
)
s.witnessBeacon = newPreimageBeacon(