From 93300f01ea945604980286617c12af4d9080a45f Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Fri, 6 Jan 2023 17:12:55 +0100 Subject: [PATCH] ship_processor.go: in processTraces() make a slice of redis.ChannelInterface instead of redis.Key so we don't have to repeat our self. --- ship_processor.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ship_processor.go b/ship_processor.go index d7d3a66..08ce9af 100644 --- a/ship_processor.go +++ b/ship_processor.go @@ -94,15 +94,15 @@ func processTraces(traces []*ship.TransactionTraceV0) { continue } - channels := []redis.Key{ - redisNs.NewKey(redis.ActionChannel{}), - redisNs.NewKey(redis.ActionChannel{Action: string(act.Action)}), - redisNs.NewKey(redis.ActionChannel{Contract: string(act.Contract)}), - redisNs.NewKey(redis.ActionChannel{Action: string(act.Action), Contract: string(act.Contract)}), + channels := []redis.ChannelInterface{ + redis.ActionChannel{}, + redis.ActionChannel{Action: string(act.Action)}, + redis.ActionChannel{Contract: string(act.Contract)}, + redis.ActionChannel{Action: string(act.Action), Contract: string(act.Contract)}, } for _, channel := range channels { - queueMessage(channel, payload) + queueMessage(redisNs.NewKey(channel), payload) } } }