lnrpc: increase max message size for ws proxy
In this commit, we increase the max message size for the ws proxy. We
have a similar setting for the normal gRPC server which was tuned to be
able to support decoding `GetNetworkInfo` as the channel graph got
larger. We keep the default buffer size of 64 KB, but allow that to be
expanded to up to 4 MB (current value) to decode larger messages.
One alternative would be to modify the `Split` function to break up
larger lines into smaller ones. We'd need to double check that the
libraries at a higher level of abstraction can handle the chunks. The
scan function would look something like:
```go
splitFunc := func(data []byte, eof bool) (int, []byte, error) {
if len(data) >= chunkSize {
return chunkSize, data[:chunkSize], nil
}
return bufio.ScanLines(data, eof))
}
scanner.Split(splitFunc)
```
This commit is contained in:
2 files changed
+20
-1
No files matched your search
@@ -228,6 +228,11 @@ None
|
||||
|
||||
* The [WalletBalance](https://github.com/lightningnetwork/lnd/pull/7857) RPC
|
||||
(lncli walletbalance) now supports showing the balance for a specific account.
|
||||
|
||||
* The [websockets proxy now uses a larger default max
|
||||
message](https://github.com/lightningnetwork/lnd/pull/7991) size to support
|
||||
proxying larger messages.
|
||||
|
||||
|
||||
## lncli Updates
|
||||
* Added ability to use [environment variables to override `lncli` global
|
||||
|
||||
Reference in new issue
Block a user