-
Notifications
You must be signed in to change notification settings - Fork 286
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
refactor!: un-export namespace.ValidateBlobNamespace
#2145
refactor!: un-export namespace.ValidateBlobNamespace
#2145
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2145 +/- ##
==========================================
- Coverage 24.41% 24.40% -0.01%
==========================================
Files 126 126
Lines 14300 14302 +2
==========================================
Hits 3491 3491
- Misses 10448 10450 +2
Partials 361 361
|
@rootulp, could you open similar PR to celeria-node? I think we may have similar issue, as our code is mostly a port. |
// validateVersion returns an error if the version is not supported. | ||
func validateVersion(version uint8) error { | ||
// validateVersionSupported returns an error if the version is not supported. | ||
func validateVersionSupported(version uint8) error { |
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.
[note to reviewers] this function was renamed per the comment in #2143
I thought the original name was clear but I'm open to alternative naming suggestions.
namespace.ValidateBlobNamespace
As far as I can see, celestia-node only has one reference to |
@rootulp, I mean the slice.Contains if should also be added to our validate function |
namespace.ValidateBlobNamespace
namespace.ValidateBlobNamespace
@@ -36,3 +35,25 @@ func RandomBlobNamespaces(rand *tmrand.Rand, count int) (namespaces []Namespace) | |||
} | |||
return namespaces | |||
} | |||
|
|||
// isBlobNamespace returns an true if this namespace is a valid user-specifiable |
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.
// isBlobNamespace returns an true if this namespace is a valid user-specifiable | |
// isBlobNamespace returns true if this namespace is a valid user-specifiable |
Closes #2143 De-duplicate `ValidateBlobNamespace` and export it from `x/blob/types` package. The namespace package needs to define its own `isBlobNamespace` because it can't import `ValidateBlobNamespace` from `x/blob/types` as that would introduce a circular dependency.
Closes #2143
De-duplicate
ValidateBlobNamespace
and export it fromx/blob/types
package. The namespace package needs to define its ownisBlobNamespace
because it can't importValidateBlobNamespace
fromx/blob/types
as that would introduce a circular dependency.