From dab4c90e36d323b4115556b3c3834ee8a089b65d Mon Sep 17 00:00:00 2001 From: ptrus Date: Tue, 26 Nov 2024 21:01:29 +0100 Subject: [PATCH] feat: report just the number of logs matched in eth_getLogs --- rpc/eth/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpc/eth/api.go b/rpc/eth/api.go index e3144a4a..39f920c4 100644 --- a/rpc/eth/api.go +++ b/rpc/eth/api.go @@ -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 } @@ -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 }