From b37af3252fc77c3af09eaa314543d8ef98165630 Mon Sep 17 00:00:00 2001 From: guillaumemichel Date: Thu, 17 Oct 2024 09:43:20 +0200 Subject: [PATCH] persisting protocols --- queen.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/queen.go b/queen.go index b5e91ee..25cf677 100644 --- a/queen.go +++ b/queen.go @@ -218,7 +218,11 @@ func (q *Queen) consumeAntsLogs(ctx context.Context) { } else { agent = peerstoreAgent.(string) } - // protocols, _ := q.peerstore.GetProtocols(log.Requester) + protocols, _ := q.peerstore.GetProtocols(log.Requester) + protocolsStr := make([]string, len(protocols)) + for i, p := range protocols { + protocolsStr[i] = string(p) + } request := models.RequestsDenormalized{ RequestStartedAt: log.Timestamp, @@ -228,6 +232,7 @@ func (q *Queen) consumeAntsLogs(ctx context.Context) { KeyMultihash: log.Target.B58String(), MultiAddresses: db.MaddrsToAddrs(maddrs), AgentVersion: null.StringFrom(agent), + Protocols: protocolsStr, } requests = append(requests, request) if len(requests) >= q.resolveBatchSize {