@@ -56,7 +56,9 @@ func newSwapServerClient(address string, insecure bool, tlsPath string,
5656
5757 // Create the server connection with the interceptor that will handle
5858 // the LSAT protocol for us.
59- clientInterceptor := lsat .NewInterceptor (lnd , lsatStore )
59+ clientInterceptor := lsat .NewInterceptor (
60+ lnd , lsatStore , serverRPCTimeout ,
61+ )
6062 serverConn , err := getSwapServerConn (
6163 address , insecure , tlsPath , clientInterceptor ,
6264 )
@@ -75,7 +77,7 @@ func newSwapServerClient(address string, insecure bool, tlsPath string,
7577func (s * grpcSwapServerClient ) GetLoopOutTerms (ctx context.Context ) (
7678 * LoopOutTerms , error ) {
7779
78- rpcCtx , rpcCancel := context .WithTimeout (ctx , serverRPCTimeout )
80+ rpcCtx , rpcCancel := context .WithTimeout (ctx , globalCallTimeout )
7981 defer rpcCancel ()
8082 terms , err := s .server .LoopOutTerms (rpcCtx ,
8183 & looprpc.ServerLoopOutTermsRequest {},
@@ -93,7 +95,7 @@ func (s *grpcSwapServerClient) GetLoopOutTerms(ctx context.Context) (
9395func (s * grpcSwapServerClient ) GetLoopOutQuote (ctx context.Context ,
9496 amt btcutil.Amount ) (* LoopOutQuote , error ) {
9597
96- rpcCtx , rpcCancel := context .WithTimeout (ctx , serverRPCTimeout )
98+ rpcCtx , rpcCancel := context .WithTimeout (ctx , globalCallTimeout )
9799 defer rpcCancel ()
98100 quoteResp , err := s .server .LoopOutQuote (rpcCtx ,
99101 & looprpc.ServerLoopOutQuoteRequest {
@@ -125,7 +127,7 @@ func (s *grpcSwapServerClient) GetLoopOutQuote(ctx context.Context,
125127func (s * grpcSwapServerClient ) GetLoopInTerms (ctx context.Context ) (
126128 * LoopInTerms , error ) {
127129
128- rpcCtx , rpcCancel := context .WithTimeout (ctx , serverRPCTimeout )
130+ rpcCtx , rpcCancel := context .WithTimeout (ctx , globalCallTimeout )
129131 defer rpcCancel ()
130132 terms , err := s .server .LoopInTerms (rpcCtx ,
131133 & looprpc.ServerLoopInTermsRequest {},
@@ -143,7 +145,7 @@ func (s *grpcSwapServerClient) GetLoopInTerms(ctx context.Context) (
143145func (s * grpcSwapServerClient ) GetLoopInQuote (ctx context.Context ,
144146 amt btcutil.Amount ) (* LoopInQuote , error ) {
145147
146- rpcCtx , rpcCancel := context .WithTimeout (ctx , serverRPCTimeout )
148+ rpcCtx , rpcCancel := context .WithTimeout (ctx , globalCallTimeout )
147149 defer rpcCancel ()
148150 quoteResp , err := s .server .LoopInQuote (rpcCtx ,
149151 & looprpc.ServerLoopInQuoteRequest {
@@ -165,7 +167,7 @@ func (s *grpcSwapServerClient) NewLoopOutSwap(ctx context.Context,
165167 receiverKey [33 ]byte , swapPublicationDeadline time.Time ) (
166168 * newLoopOutResponse , error ) {
167169
168- rpcCtx , rpcCancel := context .WithTimeout (ctx , serverRPCTimeout )
170+ rpcCtx , rpcCancel := context .WithTimeout (ctx , globalCallTimeout )
169171 defer rpcCancel ()
170172 swapResp , err := s .server .NewLoopOutSwap (rpcCtx ,
171173 & looprpc.ServerLoopOutRequest {
@@ -200,7 +202,7 @@ func (s *grpcSwapServerClient) NewLoopInSwap(ctx context.Context,
200202 swapHash lntypes.Hash , amount btcutil.Amount , senderKey [33 ]byte ,
201203 swapInvoice string ) (* newLoopInResponse , error ) {
202204
203- rpcCtx , rpcCancel := context .WithTimeout (ctx , serverRPCTimeout )
205+ rpcCtx , rpcCancel := context .WithTimeout (ctx , globalCallTimeout )
204206 defer rpcCancel ()
205207 swapResp , err := s .server .NewLoopInSwap (rpcCtx ,
206208 & looprpc.ServerLoopInRequest {
0 commit comments