-
Notifications
You must be signed in to change notification settings - Fork 52
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: add index by id for storage module #80
Conversation
7c451df
to
6701c0e
Compare
6701c0e
to
faa3a90
Compare
x/sp/keeper/sp.go
Outdated
@@ -6,6 +6,21 @@ import ( | |||
"github.com/bnb-chain/greenfield/x/sp/types" | |||
) | |||
|
|||
func (k Keeper) CheckIfValidStorageProvider(ctx sdk.Context, addr sdk.AccAddress) 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.
should CheckIsValidStorageProvider
better
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.
how about IsStorageProviderExistAndInService
?
}); err != nil { | ||
return nil, err | ||
} | ||
_ = 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.
what's this for
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.
@alexgao001 will impl this.
766c0e7
to
c31eea0
Compare
c31eea0
to
995c635
Compare
e1d36ce
to
b3614af
Compare
} | ||
|
||
sp := types.MustUnmarshalStorageProvider(k.cdc, value) | ||
if sp.Status != types.STATUS_IN_SERVICE { |
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.
CheckIfValidStorageProvider
seems the validator must be in service, any way to reflect this in the name of this function to make it more readable?
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.
how about IsStorageProviderExistAndInService
?
I did not dive into the details of this PR, will do a thorough review of the refactor PR. Please fix the e2e case. LGTM |
Thinks. E2e test case has been fixed. Please help review again. |
537612f
to
ec16a00
Compare
Description
add index bucket/object/group by id for storage module
Changes
Notable changes: