Skip to content

Commit b40b859

Browse files
committed
fix(rpc): stop getblockhash from crashing when sending hash
1 parent 2b8ebec commit b40b859

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

turbo/jsonrpc/eth_receipts.go

+4
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,10 @@ func (api *APIImpl) GetBlockReceipts(ctx context.Context, number rpc.BlockNumber
696696
}
697697
defer tx.Rollback()
698698

699+
if number.BlockNumber == nil && number.BlockHash != nil {
700+
return nil, fmt.Errorf("blockHash not supported")
701+
}
702+
699703
blockNum, blockHash, _, err := rpchelper.GetBlockNumber_zkevm(rpc.BlockNumberOrHashWithNumber(*number.BlockNumber), tx, api.filters)
700704
if err != nil {
701705
return nil, err

0 commit comments

Comments
 (0)