1
0
Fork 0
mirror of https://github.com/eosswedenorg/thalos synced 2026-06-17 04:30:03 +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
}
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)
}
}
}