1
0
Fork 0
mirror of https://github.com/eosswedenorg/thalos synced 2026-07-04 12:03:41 +02:00

ship_processor.go: in processTraces() make a slice of redis.ChannelInterface instead of redis.Key so we don't have to repeat our self.

This commit is contained in:
Henrik Hautakoski 2023-01-06 17:12:55 +01:00
parent 4b41718c78
commit 93300f01ea

View file

@ -94,15 +94,15 @@ func processTraces(traces []*ship.TransactionTraceV0) {
continue continue
} }
channels := []redis.Key{ channels := []redis.ChannelInterface{
redisNs.NewKey(redis.ActionChannel{}), redis.ActionChannel{},
redisNs.NewKey(redis.ActionChannel{Action: string(act.Action)}), redis.ActionChannel{Action: string(act.Action)},
redisNs.NewKey(redis.ActionChannel{Contract: string(act.Contract)}), redis.ActionChannel{Contract: string(act.Contract)},
redisNs.NewKey(redis.ActionChannel{Action: string(act.Action), Contract: string(act.Contract)}), redis.ActionChannel{Action: string(act.Action), Contract: string(act.Contract)},
} }
for _, channel := range channels { for _, channel := range channels {
queueMessage(channel, payload) queueMessage(redisNs.NewKey(channel), payload)
} }
} }
} }