Skip to content

Commit

Permalink
temp debug old ethrpc version
Browse files Browse the repository at this point in the history
  • Loading branch information
arilotter committed Feb 28, 2024
1 parent 404916b commit 0dde077
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ethrpc/ethrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,17 @@ func (p *Provider) Do(ctx context.Context, calls ...Call) ([]byte, error) {
req = req.WithContext(ctx)
req.Header.Set("Content-Type", "application/json")

p.log.Debugf("ethrpc: sending request to '%s', headers '%s', body '%s'", p.nodeURL, req.Header, string(b))

res, err := p.httpClient.Do(req)
if err != nil {
return nil, superr.Wrap(ErrRequestFail, fmt.Errorf("failed to send request: %w", err))
}
defer res.Body.Close()

p.log.Debugf("ethrpc: got response from '%s', response headers '%s'", p.nodeURL, res.Header)


body, err := io.ReadAll(res.Body)
if err != nil {
return nil, superr.Wrap(ErrRequestFail, fmt.Errorf("failed to read resposne body: %w", err))
Expand Down

0 comments on commit 0dde077

Please sign in to comment.