Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
pkieltyka committed Aug 25, 2023
1 parent ce75f6e commit 07a1c04
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ethrpc/ethrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func (p *Provider) RawBlockByHash(ctx context.Context, hash common.Hash) ([]byte
if err != nil {
return nil, err
}
if result == nil {
if result == nil || string(result) == "null" {
return nil, ethereum.NotFound
}
return result, nil
Expand All @@ -217,7 +217,7 @@ func (p *Provider) RawBlockByNumber(ctx context.Context, blockNum *big.Int) ([]b
if err != nil {
return nil, err
}
if result == nil {
if result == nil || string(result) == "null" {
return nil, ethereum.NotFound
}
return result, nil
Expand Down Expand Up @@ -329,7 +329,11 @@ func (p *Provider) RawFilterLogs(ctx context.Context, q ethereum.FilterQuery) ([
if err != nil {
return nil, err
}
return jsonrpc.ParseResponseResult(body)
result, err := jsonrpc.ParseResponseResult(body)
if err != nil {
return nil, err
}
return result, nil
}

func (p *Provider) FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error) {
Expand Down

0 comments on commit 07a1c04

Please sign in to comment.