Skip to content

Commit

Permalink
Merge pull request #657 from oasisprotocol/ptrus/feature/getlogs-debug
Browse files Browse the repository at this point in the history
feat: report just the number of logs matched in debug logs for `eth_getLogs`
  • Loading branch information
ptrus authored Nov 27, 2024
2 parents 502678f + dab4c90 commit 7eb8fe7
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 7eb8fe7

Please sign in to comment.