diff --git a/app/submodule/eth/eth_api.go b/app/submodule/eth/eth_api.go index 67a2cca5b4..4fbe107fb3 100644 --- a/app/submodule/eth/eth_api.go +++ b/app/submodule/eth/eth_api.go @@ -1464,14 +1464,13 @@ func (a *ethAPI) EthTraceFilter(ctx context.Context, filter types.EthTraceFilter continue } - txTrace := types.EthTraceFilterResult{ + results = append(results, &types.EthTraceFilterResult{ EthTrace: blockTrace.EthTrace, BlockHash: blockTrace.BlockHash, BlockNumber: blockTrace.BlockNumber, TransactionHash: blockTrace.TransactionHash, TransactionPosition: blockTrace.TransactionPosition, - } - results = append(results, &txTrace) + }) // If Count is specified, limit the results if filter.Count != nil && types.EthUint64(len(results)) >= *filter.Count {