mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
fix: beacon node client request with context
This commit is contained in:
parent
47bc86cd96
commit
5a6fd1df06
1 changed files with 5 additions and 1 deletions
|
|
@ -114,7 +114,11 @@ func (c *BeaconNodeClient) GetBlobByVersionedHashAndBlockTime(ctx context.Contex
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to join path, err: %w", err)
|
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 {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("cannot do request, err: %w", err)
|
return nil, fmt.Errorf("cannot do request, err: %w", err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue