mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-04 18:01:57 +01:00
rpc: implement RPC htlc interceptor.
In this commit we add the ability to intercept forwarded htlc packets straight from the RPC layer. The RPC layer handles a bidrectional stream that comminucates to the client the intercepted packets and handles its response by coordinating with the interceptable switch.
This commit is contained in:
15
rpcserver.go
15
rpcserver.go
@@ -549,13 +549,14 @@ func newRPCServer(cfg *Config, s *server, macService *macaroons.Service,
|
||||
|
||||
return info.NodeKey1Bytes, info.NodeKey2Bytes, nil
|
||||
},
|
||||
FindRoute: s.chanRouter.FindRoute,
|
||||
MissionControl: s.missionControl,
|
||||
ActiveNetParams: activeNetParams.Params,
|
||||
Tower: s.controlTower,
|
||||
MaxTotalTimelock: cfg.MaxOutgoingCltvExpiry,
|
||||
DefaultFinalCltvDelta: uint16(cfg.Bitcoin.TimeLockDelta),
|
||||
SubscribeHtlcEvents: s.htlcNotifier.SubscribeHtlcEvents,
|
||||
FindRoute: s.chanRouter.FindRoute,
|
||||
MissionControl: s.missionControl,
|
||||
ActiveNetParams: activeNetParams.Params,
|
||||
Tower: s.controlTower,
|
||||
MaxTotalTimelock: cfg.MaxOutgoingCltvExpiry,
|
||||
DefaultFinalCltvDelta: uint16(cfg.Bitcoin.TimeLockDelta),
|
||||
SubscribeHtlcEvents: s.htlcNotifier.SubscribeHtlcEvents,
|
||||
InterceptableForwarder: s.interceptableSwitch,
|
||||
}
|
||||
|
||||
genInvoiceFeatures := func() *lnwire.FeatureVector {
|
||||
|
||||
Reference in New Issue
Block a user