diff --git a/htlcswitch/interfaces.go b/htlcswitch/interfaces.go index 2c27d8ab0..bad2c353d 100644 --- a/htlcswitch/interfaces.go +++ b/htlcswitch/interfaces.go @@ -323,7 +323,7 @@ type InterceptableHtlcForwarder interface { type ForwardInterceptor func(InterceptedPacket) error // InterceptedPacket contains the relevant information for the interceptor about -// an htlc. +// an HTLC. type InterceptedPacket struct { // IncomingCircuit contains the incoming channel and htlc id of the // packet. diff --git a/lnrpc/routerrpc/forward_interceptor.go b/lnrpc/routerrpc/forward_interceptor.go index 8af1a21f6..55c77d6d9 100644 --- a/lnrpc/routerrpc/forward_interceptor.go +++ b/lnrpc/routerrpc/forward_interceptor.go @@ -22,7 +22,7 @@ var ( ErrMissingPreimage = errors.New("missing preimage") ) -// forwardInterceptor is a helper struct that handles the lifecycle of an rpc +// forwardInterceptor is a helper struct that handles the lifecycle of an RPC // interceptor streaming session. // It is created when the stream opens and disconnects when the stream closes. type forwardInterceptor struct { @@ -43,7 +43,7 @@ func newForwardInterceptor(htlcSwitch htlcswitch.InterceptableHtlcForwarder, } // run sends the intercepted packets to the client and receives the -// corersponding responses. On one hand it registered itself as an interceptor +// corresponding responses. On one hand it registered itself as an interceptor // that receives the switch packets and on the other hand launches a go routine // to read from the client stream. // To coordinate all this and make sure it is safe for concurrent access all diff --git a/lnrpc/routerrpc/router_server.go b/lnrpc/routerrpc/router_server.go index 194bdc996..a8aa4fbe5 100644 --- a/lnrpc/routerrpc/router_server.go +++ b/lnrpc/routerrpc/router_server.go @@ -1487,7 +1487,7 @@ func (s *Server) SubscribeHtlcEvents(req *SubscribeHtlcEventsRequest, // HtlcInterceptor is a bidirectional stream for streaming interception // requests to the caller. -// Upon connection it does the following: +// Upon connection, it does the following: // 1. Check if there is already a live stream, if yes it rejects the request. // 2. Registered a ForwardInterceptor // 3. Delivers to the caller every √√ and detect his answer. @@ -1500,7 +1500,7 @@ func (s *Server) HtlcInterceptor(stream Router_HtlcInterceptorServer) error { } defer atomic.CompareAndSwapInt32(&s.forwardInterceptorActive, 1, 0) - // run the forward interceptor. + // Run the forward interceptor. return newForwardInterceptor( s.cfg.RouterBackend.InterceptableForwarder, stream, ).run()