Skip to content

Commit dae6a11

Browse files
authored
jsonrpc: Fix block not found err in eth_getBlockReceipts (#13740)
Using the param instead of returned value. Fixes one more rpc-compat hive test
1 parent 8c1f3d4 commit dae6a11

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

turbo/jsonrpc/eth_receipts.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,8 @@ func (api *APIImpl) GetBlockReceipts(ctx context.Context, numberOrHash rpc.Block
515515
defer tx.Rollback()
516516
blockNum, blockHash, _, err := rpchelper.GetBlockNumber(ctx, numberOrHash, tx, api._blockReader, api.filters)
517517
if err != nil {
518-
if errors.Is(err, rpchelper.BlockNotFoundErr{Hash: blockHash}) {
518+
bnh, _ := numberOrHash.Hash()
519+
if errors.Is(err, rpchelper.BlockNotFoundErr{Hash: bnh}) {
519520
return nil, nil
520521
}
521522
return nil, err

0 commit comments

Comments
 (0)