lndclient: increase lightning gRPC block size to 50MB

This commit is contained in:
Valentine Wallace 2019-05-21 16:57:04 -07:00
parent 7fd2f1176e
commit ee5f1852d6
No known key found for this signature in database
GPG key ID: B0E55E8D1776A58D
2 changed files with 5 additions and 0 deletions

View file

@ -55,6 +55,7 @@ func NewBasicClient(lndHost, tlsPath, macDir, network string) (lnrpc.LightningCl
// Now we append the macaroon credentials to the dial options.
cred := macaroons.NewMacaroonCredential(mac)
opts = append(opts, grpc.WithPerRPCCredentials(cred))
opts = append(opts, grpc.WithDefaultCallOptions(maxMsgRecvSize))
}
// We need to use a custom dialer so we can also connect to unix sockets

View file

@ -179,6 +179,10 @@ var (
defaultChainMacaroonFilename = "chainnotifier.macaroon"
defaultWalletKitMacaroonFilename = "walletkit.macaroon"
defaultSignerFilename = "signer.macaroon"
// maxMsgRecvSize is the largest gRPC message our client will receive.
// We set this to ~50Mb.
maxMsgRecvSize = grpc.MaxCallRecvMsgSize(1 * 1024 * 1024 * 50)
)
func getClientConn(address string, network string, tlsPath string) (