diff --git a/jsonrpc/block.go b/jsonrpc/block.go index b466b59..3a97338 100644 --- a/jsonrpc/block.go +++ b/jsonrpc/block.go @@ -42,7 +42,7 @@ func (s *Service) blockAtHash(ctx context.Context, hash string) (*spec.Block, er var block spec.Block if err := s.client.CallFor(&block, "eth_getBlockByHash", hash, true); err != nil { - return nil, err + return nil, errors.Wrap(err, fmt.Sprintf("eth_getBlockByHash for %#x failed", hash)) } return &block, nil @@ -53,11 +53,11 @@ func (s *Service) blockAtHeight(ctx context.Context, height int64) (*spec.Block, if height == -1 { if err := s.client.CallFor(&block, "eth_getBlockByNumber", "latest", true); err != nil { - return nil, err + return nil, errors.Wrap(err, "eth_getBlockByNumber for latest failed") } } else { if err := s.client.CallFor(&block, "eth_getBlockByNumber", fmt.Sprintf("0x%x", height), true); err != nil { - return nil, err + return nil, errors.Wrap(err, fmt.Sprintf("eth_getBlockByNumber for 0x%x failed", height)) } } diff --git a/jsonrpc/service.go b/jsonrpc/service.go index 4bd0662..176a772 100644 --- a/jsonrpc/service.go +++ b/jsonrpc/service.go @@ -123,10 +123,6 @@ func New(ctx context.Context, params ...Parameter) (execclient.Service, error) { // fetchStaticValues fetches values that never change. // This caches the values, avoiding future API calls. func (s *Service) fetchStaticValues(ctx context.Context) error { - if _, err := s.NetworkID(ctx); err != nil { - return errors.Wrap(err, "failed to fetch network ID") - } - return nil } diff --git a/spec/type0transaction.go b/spec/type0transaction.go index 76e1327..37279be 100644 --- a/spec/type0transaction.go +++ b/spec/type0transaction.go @@ -168,7 +168,7 @@ func (t *Type0Transaction) unpack(data *type0TransactionJSON) error { } t.GasPrice, err = strconv.ParseUint(util.PreUnmarshalHexString(data.GasPrice), 16, 64) if err != nil { - return errors.Wrap(err, "gas price invalid") + return errors.Wrap(err, fmt.Sprintf("gas price for %s invalid", data.Hash)) } if data.Hash == "" {