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.
This commit is contained in:
Olaoluwa Osuntokun 2020-05-18 14:38:42 -07:00
parent 2ec580c92b
commit e97ec65444
No known key found for this signature in database
GPG key ID: BC13F65E2DC84465

View file

@ -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...)