internal/ethapi: avoid int overflow in GetTransactionReceipt (#26911)

This commit is contained in:
Darioush Jalali authored and GitHub committed 2023-03-16 23:53:39 +01:00
1 parent d8066dcde8
commit f733657383
1 file changed
+1 -1
+1 -1
View File
@@ -1626,7 +1626,7 @@ func (s *TransactionAPI) GetTransactionReceipt(ctx context.Context, hash common.
if err != nil {
return nil, err
}
if len(receipts) <= int(index) {
if uint64(len(receipts)) <= index {
return nil, nil
}
receipt := receipts[index]