fix: blob client beacon node do http request with context (#1228)

* fix: beacon node client request with context

* chore: auto version bump [bot]
This commit is contained in:
Morty 2025-07-29 19:30:41 +08:00 committed by GitHub
parent 3d2f3793d9
commit 4c967ae4c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View file

@ -24,7 +24,7 @@ import (
const (
VersionMajor = 5 // Major version component of the current release
VersionMinor = 8 // Minor version component of the current release
VersionPatch = 74 // Patch version component of the current release
VersionPatch = 75 // Patch version component of the current release
VersionMeta = "mainnet" // Version metadata to append to the version string
)

View file

@ -114,7 +114,11 @@ func (c *BeaconNodeClient) GetBlobByVersionedHashAndBlockTime(ctx context.Contex
if err != nil {
return nil, fmt.Errorf("failed to join path, err: %w", err)
}
resp, err := c.client.Get(blobSidecarPath)
req, err := http.NewRequestWithContext(ctx, "GET", blobSidecarPath, nil)
if err != nil {
return nil, fmt.Errorf("failed to create request, err: %w", err)
}
resp, err := c.client.Do(req)
if err != nil {
return nil, fmt.Errorf("cannot do request, err: %w", err)
}