mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-10 06:07:16 +01:00
etcd: make max message size configurable
This commit is contained in:
@@ -30,6 +30,8 @@ type Config struct {
|
||||
|
||||
CollectStats bool `long:"collect_stats" description:"Whether to collect etcd commit stats."`
|
||||
|
||||
MaxMsgSize int `long:"max_msg_size" description:"The maximum message size in bytes that we may send to etcd."`
|
||||
|
||||
// SingleWriter should be set to true if we intend to only allow a
|
||||
// single writer to the database at a time.
|
||||
SingleWriter bool
|
||||
|
||||
@@ -141,7 +141,7 @@ func newEtcdBackend(ctx context.Context, cfg Config) (*db, error) {
|
||||
DialTimeout: etcdConnectionTimeout,
|
||||
Username: cfg.User,
|
||||
Password: cfg.Pass,
|
||||
MaxCallSendMsgSize: 16384*1024 - 1,
|
||||
MaxCallSendMsgSize: cfg.MaxMsgSize,
|
||||
}
|
||||
|
||||
if !cfg.DisableTLS {
|
||||
|
||||
Reference in New Issue
Block a user