fix: temporarily setting RateLimitProof to nil so it matches the WakuMessage protobuffer we are sending

See https://github.com/vacp2p/rfc/issues/563
This commit is contained in:
Richard Ramos 2022-12-20 13:59:59 -04:00 committed by RichΛrd
parent 78795ce3e0
commit 9e80f22de6
1 changed files with 4 additions and 0 deletions

View File

@ -1099,6 +1099,10 @@ func (w *Waku) Query(peerID peer.ID, topics []common.TopicType, from uint64, to
}
for _, msg := range result.Messages {
// Temporarily setting RateLimitProof to nil so it matches the WakuMessage protobuffer we are sending
// See https://github.com/vacp2p/rfc/issues/563
msg.RateLimitProof = nil
envelope := protocol.NewEnvelope(msg, msg.Timestamp, relay.DefaultWakuTopic)
w.logger.Info("received waku2 store message", zap.Any("envelopeHash", hexutil.Encode(envelope.Hash())))
_, err = w.OnNewEnvelopes(envelope, common.StoreMessageType)