diff --git a/cmd/soroban-rpc/internal/db/cursor.go b/cmd/soroban-rpc/internal/db/cursor.go index 8393f104..4102038d 100644 --- a/cmd/soroban-rpc/internal/db/cursor.go +++ b/cmd/soroban-rpc/internal/db/cursor.go @@ -129,9 +129,9 @@ var ( // MaxCursor is the largest possible cursor //nolint:gochecknoglobals MaxCursor = Cursor{ - Ledger: math.MaxUint32, - Tx: math.MaxUint32, - Op: math.MaxUint32, + Ledger: math.MaxInt32, + Tx: math.MaxInt32, + Op: math.MaxInt32, Event: math.MaxUint32, } ) diff --git a/cmd/soroban-rpc/internal/methods/get_events.go b/cmd/soroban-rpc/internal/methods/get_events.go index 933e6d81..0bc7ab11 100644 --- a/cmd/soroban-rpc/internal/methods/get_events.go +++ b/cmd/soroban-rpc/internal/methods/get_events.go @@ -446,10 +446,8 @@ func (h eventsRPCHandler) getEvents(ctx context.Context, request GetEventsReques } } endLedger := start.Ledger + LedgerScanLimit - // endLedger should not exceed ledger retention window endLedger = min(ledgerRange.LastLedger.Sequence+1, endLedger) - if request.EndLedger != 0 { endLedger = min(request.EndLedger, endLedger) }