lnd: increase max message receive size for REST proxy

This commit is contained in:
Oliver Gugger 2019-11-18 14:03:46 +01:00
parent 88f037f8fd
commit 4cd06465ea
No known key found for this signature in database
GPG Key ID: 8E4256593F177720

4
lnd.go
View File

@ -224,10 +224,12 @@ func Main(lisCfg ListenerCfg) error {
// For our REST dial options, we'll still use TLS, but also increase
// the max message size that we'll decode to allow clients to hit
// endpoints which return more data such as the DescribeGraph call.
// We set this to 200MiB atm. Should be the same value as maxMsgRecvSize
// in cmd/lncli/main.go.
restDialOpts := []grpc.DialOption{
grpc.WithTransportCredentials(*restCreds),
grpc.WithDefaultCallOptions(
grpc.MaxCallRecvMsgSize(1 * 1024 * 1024 * 50),
grpc.MaxCallRecvMsgSize(1 * 1024 * 1024 * 200),
),
}