mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-23 12:13:50 +02:00
htlcswitch: add error return value to NewInterceptableSwitch
Prepares for parameter validation.
This commit is contained in:
@@ -666,7 +666,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
s.interceptableSwitch = htlcswitch.NewInterceptableSwitch(
|
||||
s.interceptableSwitch, err = htlcswitch.NewInterceptableSwitch(
|
||||
&htlcswitch.InterceptableSwitchConfig{
|
||||
Switch: s.htlcSwitch,
|
||||
CltvRejectDelta: lncfg.DefaultFinalCltvRejectDelta,
|
||||
@@ -674,6 +674,9 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
||||
Notifier: s.cc.ChainNotifier,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
s.witnessBeacon = newPreimageBeacon(
|
||||
dbs.ChanStateDB.NewWitnessCache(),
|
||||
|
Reference in New Issue
Block a user