Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update content-topic parsing for filter #2835

Merged
merged 3 commits into from
Jun 21, 2024
Merged

Conversation

darshankabariya
Copy link
Contributor

close #2834

This is a minor change to fix bug #2834.

@darshankabariya darshankabariya changed the title chore: update content parsing for filter chore: update content-topic parsing for filter Jun 20, 2024
Copy link

github-actions bot commented Jun 20, 2024

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2835

Built from 350796b

Copy link
Contributor

@NagyZoltanPeter NagyZoltanPeter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch, thank you!

@gabrielmer
Copy link
Contributor

I think this should be run only if relay is configured. If filter is configured and relay isn't, with these changes we would still mount relay

try:
await mountRelay(
node,
pubsubTopics,
peerExchangeHandler = peerExchangeHandler,
int(parsedMaxMsgSize),
)
except CatchableError:
return err("failed to mount waku relay protocol: " & getCurrentExceptionMsg())

@darshankabariya
Copy link
Contributor Author

I think this should be run only if relay is configured. If filter is configured and relay isn't, with these changes we would still mount relay

try:
await mountRelay(
node,
pubsubTopics,
peerExchangeHandler = peerExchangeHandler,
int(parsedMaxMsgSize),
)
except CatchableError:
return err("failed to mount waku relay protocol: " & getCurrentExceptionMsg())

Thanks for suggesting @gabrielmer !

Copy link
Contributor

@gabrielmer gabrielmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much!

Added a last detail to align :))

if conf.relay:
let shards =
conf.contentTopics.mapIt(node.wakuSharding.getShard(it).expect("Valid Shard"))
let pubsubTopics = conf.pubsubTopics & shards

debug "Shards created from content topics",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should move this log to be right below

let shards =
conf.contentTopics.mapIt(node.wakuSharding.getShard(it).expect("Valid Shard"))

@darshankabariya darshankabariya merged commit 733edae into master Jun 21, 2024
8 of 10 checks passed
@darshankabariya darshankabariya deleted the bug_2834 branch June 21, 2024 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: Unexpected behavior due to relay and filter presence in config-file
3 participants