-
Notifications
You must be signed in to change notification settings - Fork 261
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
Remove duplicated random valid namespace #838
Remove duplicated random valid namespace #838
Conversation
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.
Thanks a lot for helping out with this. LGTM. Left a blocking question
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.
Thanks for the contribution @raphaelts3 ! Excited to hear you're participating in hacktoberfest.
I think the label you mentioned is sufficient to pass their rule based on:
pkg/utils/util.go
Outdated
tmrand "github.com/tendermint/tendermint/libs/rand" | ||
) | ||
|
||
func RandomValidNamespace() namespace.ID { |
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.
[optional]
func RandomValidNamespace() namespace.ID { | |
func RandomMessageNamespace() namespace.ID { |
Note: accepting this suggestion implies renaming usage across all files
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.
Accepted and renamed.
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.
The new name still doesn't feel like the best one but seems less troublesome than the previous one.
Thanks for this article, very good points there.
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.
RandomMessageNamespace
👍 makes sense to me
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.
🚀
073dc7b
to
0db4998
Compare
9620f00
to
1b93774
Compare
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.
Thanks again for the contribution @raphaelts3 and persisting through rounds of feedback!
[optional][should be done in a different PR] It makes sense to me tho that the new namespace package is moved to the testutil package, given that this is exclusively a testutil function |
I took a stab at this yesterday but it caused cyclic imports. Agreed that there may be a more desirable long-term location for this util |
while this doesn't resolve the annoying name conflict, it should fix the cyclic imports, no? |
oh sorry, I meant that I tried moving the |
Maybe resolves #838 (comment) if I interpreted it correctly
Closes celestiaorg#836 Hey, @rootulp I'm not an expert go, so I don't know if the move I've made is the best possible, but it did its job. That said if you have any suggestions to improve that I'm open to adjusting it. PS: Since the repo doesn't contain the tag `hacktoberfest`, would be possible to label this PR with `hacktoberfest-accepted` so it can be validated there by the rule below? > PR/MRs that also have the “hacktoberfest-accepted” label cannot be marked as spammy via a label.
Maybe resolves celestiaorg#838 (comment) if I interpreted it correctly
Maybe resolves celestiaorg/celestia-app#838 (comment) if I interpreted it correctly
Closes #836
Hey, @rootulp I'm not an expert go, so I don't know if the move I've made is the best possible, but it did its job. That said if you have any suggestions to improve that I'm open to adjusting it.
PS: Since the repo doesn't contain the tag
hacktoberfest
, would be possible to label this PR withhacktoberfest-accepted
so it can be validated there by the rule below?