fix: beacon node client request with context

This commit is contained in:
Morty 2025-07-29 19:10:49 +08:00
parent 47bc86cd96
commit 5a6fd1df06

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)
}