http response handling improvements (#14673)

Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
This commit is contained in:
kasey
2024-11-27 16:13:45 -06:00
committed by GitHub
parent bdbb850250
commit 1707cf3ec7
9 changed files with 42 additions and 20 deletions

View File

@@ -42,11 +42,13 @@ var downloadCmd = &cli.Command{
},
}
const stateSizeLimit int64 = 1 << 29 // 512MB to accommodate future state growth
func cliActionDownload(_ *cli.Context) error {
ctx := context.Background()
f := downloadFlags
opts := []client.ClientOpt{client.WithTimeout(f.Timeout)}
opts := []client.ClientOpt{client.WithTimeout(f.Timeout), client.WithMaxBodySize(stateSizeLimit)}
client, err := beacon.NewClient(downloadFlags.BeaconNodeHost, opts...)
if err != nil {
return err