From e97ec65444dc5b2d77041753a303b887be246ee6 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Mon, 18 May 2020 14:38:42 -0700 Subject: [PATCH] lndclient: also set gRPC max resp size for sub-servers In this commit, we now ensure that we set the max resp size for the sub-server connection we create. Without this, it's possible that several calls fail if the responses aren't yet paginated, or are very large. --- lndclient/lnd_services.go | 1 + 1 file changed, 1 insertion(+) diff --git a/lndclient/lnd_services.go b/lndclient/lnd_services.go index bae1cf5..110fe19 100644 --- a/lndclient/lnd_services.go +++ b/lndclient/lnd_services.go @@ -448,6 +448,7 @@ func getClientConn(cfg *LndServicesConfig) (*grpc.ClientConn, error) { // Use a custom dialer, to allow connections to unix sockets, // in-memory listeners etc, and not just TCP addresses. grpc.WithContextDialer(cfg.Dialer), + grpc.WithDefaultCallOptions(maxMsgRecvSize), } conn, err := grpc.Dial(cfg.LndAddress, opts...)