mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-26 22:56:42 +02:00
routerrpc+htlcswitch: move intercepted htlc tracking to switch
In this commit we move the tracking of the outstanding intercepted htlcs to InterceptableSwitch. This is a preparation for making the htlc interceptor required. Required interception involves tracking outstanding htlcs across multiple grpc client sessions. The per-session routerrpc forwardInterceptor object is therefore no longer the best place for that.
This commit is contained in:
@@ -890,7 +890,9 @@ func (s *Server) HtlcInterceptor(stream Router_HtlcInterceptorServer) error {
|
||||
defer atomic.CompareAndSwapInt32(&s.forwardInterceptorActive, 1, 0)
|
||||
|
||||
// run the forward interceptor.
|
||||
return newForwardInterceptor(s, stream).run()
|
||||
return newForwardInterceptor(
|
||||
s.cfg.RouterBackend.InterceptableForwarder, stream,
|
||||
).run()
|
||||
}
|
||||
|
||||
func extractOutPoint(req *UpdateChanStatusRequest) (*wire.OutPoint, error) {
|
||||
|
Reference in New Issue
Block a user