Skip to content
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

x/distribution: gRPC query service #6600

Merged
merged 44 commits into from
Jul 13, 2020
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
7253a7b
WIP: adding grpc
atheeshp Jun 30, 2020
49ecf4c
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Jun 30, 2020
f7d6a3f
added grpc for query withdraw address
atheeshp Jun 30, 2020
18794c8
Fix outstanding rewards query
sahith-narahari Jul 4, 2020
ff9f779
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Jul 4, 2020
028d970
Merge branch 'atheesh/5921-grpc-x-distribution' of github.com:cosmos/…
atheeshp Jul 4, 2020
8cd803d
added inteerface registry
atheeshp Jul 4, 2020
8ad7552
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Jul 5, 2020
73c8260
added gRPC for delegation rewards
atheeshp Jul 5, 2020
f65d0cb
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Jul 5, 2020
c09c661
added remaining commands
atheeshp Jul 6, 2020
a6365be
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Jul 6, 2020
5779013
lint issue
atheeshp Jul 6, 2020
c5d169f
added tests
atheeshp Jul 6, 2020
4827d51
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Jul 6, 2020
c2205b3
added test for community pool
atheeshp Jul 6, 2020
64ed973
fixed error
atheeshp Jul 6, 2020
e46323e
added test for delegator validators
atheeshp Jul 6, 2020
6cce6fd
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Jul 7, 2020
68f6f2e
updated to use test suite
atheeshp Jul 7, 2020
9a81ca4
updated tests
atheeshp Jul 7, 2020
d9cb8e1
more test checks added
atheeshp Jul 7, 2020
4ff5055
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Jul 7, 2020
5a60433
updated tests
atheeshp Jul 7, 2020
beea59e
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Jul 7, 2020
860d861
Add sdk wrap
anilcse Jul 7, 2020
a3ab8b3
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Jul 8, 2020
38968d3
removed pagination for outstanding rewards
atheeshp Jul 8, 2020
47382de
fixed distr tests issue
atheeshp Jul 8, 2020
b7d5c1e
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Jul 8, 2020
5774377
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Jul 9, 2020
ab551f3
fixed slashes issue
atheeshp Jul 9, 2020
fd93254
migrated tests to table driven tests
atheeshp Jul 9, 2020
99a3c16
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Jul 9, 2020
7df5225
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Jul 10, 2020
6ae0dfd
docs updated
atheeshp Jul 10, 2020
d585c88
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Jul 13, 2020
161a89c
review changes
atheeshp Jul 13, 2020
e037e0d
review changes
atheeshp Jul 13, 2020
51a0c2f
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Jul 13, 2020
3dbee1e
Merge branch 'master' into atheesh/5921-grpc-x-distribution
alexanderbez Jul 13, 2020
f2c8134
review changes
atheeshp Jul 13, 2020
6e124c4
Update x/distribution/keeper/grpc_query.go
fedekunze Jul 13, 2020
37c7455
Merge branch 'master' into atheesh/5921-grpc-x-distribution
fedekunze Jul 13, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed slashes issue
  • Loading branch information
atheeshp committed Jul 9, 2020
commit ab551f3a6151a9c83139979bdaf3e7956a2cbbba
4 changes: 3 additions & 1 deletion x/distribution/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package keeper
import (
"context"

"github.com/cosmos/cosmos-sdk/store/prefix"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/types/query"
Expand Down Expand Up @@ -56,8 +57,9 @@ func (k Keeper) ValidatorSlashes(c context.Context, req *types.QueryValidatorSla
ctx := sdk.UnwrapSDKContext(c)
events := make([]types.ValidatorSlashEvent, 0)
store := ctx.KVStore(k.storeKey)
slashesStore := prefix.NewStore(store, types.GetValidatorSlashEventPrefix(req.ValidatorAddress))

res, err := query.FilteredPaginate(store, req.Req, func(key []byte, value []byte, accumulate bool) (bool, error) {
res, err := query.FilteredPaginate(slashesStore, req.Req, func(key []byte, value []byte, accumulate bool) (bool, error) {
var result types.ValidatorSlashEvent
err := k.cdc.UnmarshalBinaryBare(value, &result)

Expand Down