fix(wakuv2): store query pubsubTopic

This commit is contained in:
Richard Ramos 2023-11-22 10:30:49 -04:00 committed by richΛrd
parent e67bee6e7b
commit 40c9ba82a5
1 changed files with 1 additions and 0 deletions

View File

@ -1102,6 +1102,7 @@ func (w *Waku) query(ctx context.Context, peerID peer.ID, pubsubTopic string, to
func (w *Waku) Query(ctx context.Context, peerID peer.ID, pubsubTopic string, topics []common.TopicType, from uint64, to uint64, opts []store.HistoryRequestOption) (cursor *storepb.Index, err error) { func (w *Waku) Query(ctx context.Context, peerID peer.ID, pubsubTopic string, topics []common.TopicType, from uint64, to uint64, opts []store.HistoryRequestOption) (cursor *storepb.Index, err error) {
requestID := protocol.GenerateRequestID() requestID := protocol.GenerateRequestID()
opts = append(opts, store.WithRequestID(requestID)) opts = append(opts, store.WithRequestID(requestID))
pubsubTopic = w.getPubsubTopic(pubsubTopic)
result, err := w.query(ctx, peerID, pubsubTopic, topics, from, to, opts) result, err := w.query(ctx, peerID, pubsubTopic, topics, from, to, opts)
if err != nil { if err != nil {
w.logger.Error("error querying storenode", zap.String("requestID", hexutil.Encode(requestID)), zap.String("peerID", peerID.String()), zap.Error(err)) w.logger.Error("error querying storenode", zap.String("requestID", hexutil.Encode(requestID)), zap.String("peerID", peerID.String()), zap.Error(err))