Merge pull request #2374 from Roasbeef/increase-lightning-block-size
cmd/lncli: increase lightning gRPC block size to 50MB
This commit is contained in:
commit
c0087e8be5
@ -37,6 +37,10 @@ const (
|
||||
var (
|
||||
defaultLndDir = btcutil.AppDataDir("lnd", false)
|
||||
defaultTLSCertPath = filepath.Join(defaultLndDir, defaultTLSCertFilename)
|
||||
|
||||
// maxMsgRecvSize is the largest message our client will receive. We
|
||||
// set this to ~50Mb atm.
|
||||
maxMsgRecvSize = grpc.MaxCallRecvMsgSize(1 * 1024 * 1024 * 50)
|
||||
)
|
||||
|
||||
func fatal(err error) {
|
||||
@ -131,11 +135,10 @@ func getClientConn(ctx *cli.Context, skipMacaroons bool) *grpc.ClientConn {
|
||||
|
||||
// We need to use a custom dialer so we can also connect to unix sockets
|
||||
// and not just TCP addresses.
|
||||
opts = append(
|
||||
opts, grpc.WithDialer(
|
||||
lncfg.ClientAddressDialer(defaultRPCPort),
|
||||
),
|
||||
)
|
||||
genericDialer := lncfg.ClientAddressDialer(defaultRPCPort)
|
||||
opts = append(opts, grpc.WithDialer(genericDialer))
|
||||
opts = append(opts, grpc.WithDefaultCallOptions(maxMsgRecvSize))
|
||||
|
||||
conn, err := grpc.Dial(ctx.GlobalString("rpcserver"), opts...)
|
||||
if err != nil {
|
||||
fatal(fmt.Errorf("unable to connect to RPC server: %v", err))
|
||||
|
Loading…
Reference in New Issue
Block a user