Skip to content

Commit

Permalink
fix: memory aliasing in loop
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-ramos committed Nov 17, 2023
1 parent 7a792c2 commit 76f55bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion protocol/transport/filters_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ func (f *FiltersManager) InitCommunityFilters(communityFiltersToInitialize []Com
// TODO: requests to join / cancels are currently being sent into the default waku topic.
// They must be sent into an specific non protected shard
for _, pubsubTopic := range topics {
identityStr := PublicKeyToStr(&cf.PrivKey.PublicKey)
pk := &cf.PrivKey.PublicKey
identityStr := PublicKeyToStr(pk)
rawFilter, err := f.addAsymmetric(identityStr, pubsubTopic, cf.PrivKey, true)
if err != nil {
f.logger.Debug("could not register community filter", zap.Error(err))
Expand Down

0 comments on commit 76f55bc

Please sign in to comment.