-
Notifications
You must be signed in to change notification settings - Fork 5
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 grpc endpoints for staking
module, extend cli and endpoints, improve impls
#291
Conversation
… values from wrappers
be76699
to
78f9322
Compare
x/staking/src/keeper/query.rs
Outdated
@@ -149,6 +155,82 @@ impl< | |||
} | |||
} | |||
|
|||
pub fn query_delegator_validator<DB: Database>( |
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.
Omit writing such method in keeper. Better move them to abci_handler
x/staking/src/keeper/query.rs
Outdated
} | ||
} | ||
|
||
pub fn query_validator_delegations<DB: Database>( |
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.
Omit writing such method in keeper. Better move them to abci_handler
x/staking/src/keeper/query.rs
Outdated
} | ||
} | ||
|
||
pub fn query_validator_unbonding_delegations<DB: Database>( |
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.
Omit writing such method in keeper. Better move them to abci_handler
x/staking/src/keeper/query.rs
Outdated
@@ -228,6 +310,71 @@ impl< | |||
(p_result, iter.collect()) | |||
} | |||
|
|||
/// query_delegator_validators queries all validators info for given delegator address | |||
pub fn query_delegator_validators<DB: Database>( |
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.
Omit writing such method in keeper. Better move them to abci_handler
x/staking/src/keeper/query.rs
Outdated
} | ||
} | ||
|
||
pub fn query_historical_info<DB: Database>( |
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.
Omit writing such method in keeper. Better move them to abci_handler
x/staking/src/keeper/query.rs
Outdated
} | ||
} | ||
|
||
pub fn query_pool<DB: Database>(&self, ctx: &QueryContext<DB, SK>) -> QueryPoolResponse { |
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.
Omit writing such method in keeper. Better move them to abci_handler
x/staking/src/abci_handler.rs
Outdated
@@ -201,6 +242,22 @@ impl< | |||
|
|||
Ok(self.keeper.query_validators(ctx, req).into_bytes()) | |||
} | |||
"/cosmos.staking.v1beta1.Query/ValidatorDelegations" => { |
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.
Prefer {TYPE_NAME}::QUERY_URL
if query implement with macro.
No description provided.