Skip to content

Commit

Permalink
feat: report just the number of logs matched in eth_getLogs
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrus committed Nov 26, 2024
1 parent 502678f commit dab4c90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rpc/eth/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ func (api *publicAPI) GetLogs(ctx context.Context, filter filters.FilterCriteria

// Early return if no further filtering.
if len(filter.Addresses) == 0 && len(filter.Topics) == 0 {
logger.Debug("response", "rsp", ethLogs)
logger.Debug("response", "num_logs", len(ethLogs))
return ethLogs, nil
}

Expand All @@ -709,7 +709,7 @@ func (api *publicAPI) GetLogs(ctx context.Context, filter filters.FilterCriteria
filtered = append(filtered, log)
}

logger.Debug("response", "rsp", filtered, "all_logs", ethLogs)
logger.Debug("response", "num_logs", len(filtered), "all_logs", ethLogs)
return filtered, nil
}

Expand Down

0 comments on commit dab4c90

Please sign in to comment.