@@ -56,7 +56,9 @@ func newSwapServerClient(address string, insecure bool, tlsPath string,
56
56
57
57
// Create the server connection with the interceptor that will handle
58
58
// the LSAT protocol for us.
59
- clientInterceptor := lsat .NewInterceptor (lnd , lsatStore )
59
+ clientInterceptor := lsat .NewInterceptor (
60
+ lnd , lsatStore , serverRPCTimeout ,
61
+ )
60
62
serverConn , err := getSwapServerConn (
61
63
address , insecure , tlsPath , clientInterceptor ,
62
64
)
@@ -75,7 +77,7 @@ func newSwapServerClient(address string, insecure bool, tlsPath string,
75
77
func (s * grpcSwapServerClient ) GetLoopOutTerms (ctx context.Context ) (
76
78
* LoopOutTerms , error ) {
77
79
78
- rpcCtx , rpcCancel := context .WithTimeout (ctx , serverRPCTimeout )
80
+ rpcCtx , rpcCancel := context .WithTimeout (ctx , globalCallTimeout )
79
81
defer rpcCancel ()
80
82
terms , err := s .server .LoopOutTerms (rpcCtx ,
81
83
& looprpc.ServerLoopOutTermsRequest {},
@@ -93,7 +95,7 @@ func (s *grpcSwapServerClient) GetLoopOutTerms(ctx context.Context) (
93
95
func (s * grpcSwapServerClient ) GetLoopOutQuote (ctx context.Context ,
94
96
amt btcutil.Amount ) (* LoopOutQuote , error ) {
95
97
96
- rpcCtx , rpcCancel := context .WithTimeout (ctx , serverRPCTimeout )
98
+ rpcCtx , rpcCancel := context .WithTimeout (ctx , globalCallTimeout )
97
99
defer rpcCancel ()
98
100
quoteResp , err := s .server .LoopOutQuote (rpcCtx ,
99
101
& looprpc.ServerLoopOutQuoteRequest {
@@ -125,7 +127,7 @@ func (s *grpcSwapServerClient) GetLoopOutQuote(ctx context.Context,
125
127
func (s * grpcSwapServerClient ) GetLoopInTerms (ctx context.Context ) (
126
128
* LoopInTerms , error ) {
127
129
128
- rpcCtx , rpcCancel := context .WithTimeout (ctx , serverRPCTimeout )
130
+ rpcCtx , rpcCancel := context .WithTimeout (ctx , globalCallTimeout )
129
131
defer rpcCancel ()
130
132
terms , err := s .server .LoopInTerms (rpcCtx ,
131
133
& looprpc.ServerLoopInTermsRequest {},
@@ -143,7 +145,7 @@ func (s *grpcSwapServerClient) GetLoopInTerms(ctx context.Context) (
143
145
func (s * grpcSwapServerClient ) GetLoopInQuote (ctx context.Context ,
144
146
amt btcutil.Amount ) (* LoopInQuote , error ) {
145
147
146
- rpcCtx , rpcCancel := context .WithTimeout (ctx , serverRPCTimeout )
148
+ rpcCtx , rpcCancel := context .WithTimeout (ctx , globalCallTimeout )
147
149
defer rpcCancel ()
148
150
quoteResp , err := s .server .LoopInQuote (rpcCtx ,
149
151
& looprpc.ServerLoopInQuoteRequest {
@@ -165,7 +167,7 @@ func (s *grpcSwapServerClient) NewLoopOutSwap(ctx context.Context,
165
167
receiverKey [33 ]byte , swapPublicationDeadline time.Time ) (
166
168
* newLoopOutResponse , error ) {
167
169
168
- rpcCtx , rpcCancel := context .WithTimeout (ctx , serverRPCTimeout )
170
+ rpcCtx , rpcCancel := context .WithTimeout (ctx , globalCallTimeout )
169
171
defer rpcCancel ()
170
172
swapResp , err := s .server .NewLoopOutSwap (rpcCtx ,
171
173
& looprpc.ServerLoopOutRequest {
@@ -200,7 +202,7 @@ func (s *grpcSwapServerClient) NewLoopInSwap(ctx context.Context,
200
202
swapHash lntypes.Hash , amount btcutil.Amount , senderKey [33 ]byte ,
201
203
swapInvoice string ) (* newLoopInResponse , error ) {
202
204
203
- rpcCtx , rpcCancel := context .WithTimeout (ctx , serverRPCTimeout )
205
+ rpcCtx , rpcCancel := context .WithTimeout (ctx , globalCallTimeout )
204
206
defer rpcCancel ()
205
207
swapResp , err := s .server .NewLoopInSwap (rpcCtx ,
206
208
& looprpc.ServerLoopInRequest {
0 commit comments