From 0dde0778f56bbf9bdde8873eee95bef9a703385f Mon Sep 17 00:00:00 2001 From: Ari Lotter Date: Wed, 28 Feb 2024 12:11:12 -0500 Subject: [PATCH] temp debug old ethrpc version --- ethrpc/ethrpc.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ethrpc/ethrpc.go b/ethrpc/ethrpc.go index f1f3c16a..a658fd74 100644 --- a/ethrpc/ethrpc.go +++ b/ethrpc/ethrpc.go @@ -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))