Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wanliqun committed Nov 4, 2024
1 parent e4d262c commit 4d76044
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rpc/handler/cfx_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,11 @@ func (handler *CfxLogsApiHandler) getLogsReorgGuard(
// convert block number range back to epoch number range for log filter with epoch range
if filter.FromEpoch != nil {
var valErr *store.SuggestedFilterOversizedError[store.SuggestedBlockRange]
if errors.As(err, &valErr) && valErr.SuggestedRange.MaxEndEpoch != 0 {
if errors.As(err, &valErr) {
if valErr.SuggestedRange.MaxEndEpoch == 0 {
return nil, false, valErr.Unwrap()
}

fromEpoch, _ := filter.FromEpoch.ToInt()
maxPossibleEpochNum := valErr.SuggestedRange.MaxEndEpoch
endBlockNum := valErr.SuggestedRange.To
Expand Down

0 comments on commit 4d76044

Please sign in to comment.