-
Notifications
You must be signed in to change notification settings - Fork 248
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
feat(nwaku): add protected topics #6220
Conversation
We require commits to follow the Conventional Commits, but with
|
Jenkins BuildsClick to see older builds (8)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
a17c2bc
to
569c76b
Compare
569c76b
to
3592424
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feature/nwaku-in-status #6220 +/- ##
===============================================
===============================================
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for delay. I'm just adding a couple of nitpick comment to maybe consider in the future.
|
||
if pubkey != nil { | ||
err := w.node.Relay().AddSignedTopicValidator(topic, pubkey) | ||
err := w.node.RelayAddProtectedShard(rs[0].ClusterID, rs[0].ShardIDs[0], pubkey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should also make sure rs[0].ShardIDs.len != 0
@@ -2642,6 +2660,37 @@ func (n *WakuNode) RelaySubscribe(pubsubTopic string) error { | |||
return errors.New(errMsg) | |||
} | |||
|
|||
func (n *WakuNode) RelayAddProtectedShard(clusterId uint16, shardId uint16, pubkey *ecdsa.PublicKey) error { | |||
if pubkey == nil { | |||
return nil // Nothing to do here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it better to return an error in this case?
No description provided.