-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
GRPC querier init and bank #5882
Conversation
This pull request introduces 1 alert when merging 30fc2a59b95b9587ffa126d89cbf871b40f8563f into 77dd247 - view on LGTM.com new alerts:
|
if err != nil { | ||
return err | ||
} | ||
resBz, err := querier(q.ctx, path[2:], abci.RequestQuery{Data: reqBz}) |
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.
ineffectual assignment to err
(from ineffassign
)
@@ -1,6 +1,9 @@ | |||
package types | |||
|
|||
import "regexp" | |||
import ( | |||
"google.golang.org/grpc" |
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.
File is not goimports
-ed (from goimports
)
"google.golang.org/grpc" |
abci "github.com/tendermint/tendermint/abci/types" | ||
|
||
"github.com/cosmos/cosmos-sdk/codec" | ||
"context" |
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.
File is not goimports
-ed (from goimports
)
"context" | |
"context" | |
baseapp/queryrouter.go
Outdated
"google.golang.org/grpc" | ||
"google.golang.org/grpc/encoding" | ||
"google.golang.org/grpc/encoding/proto" | ||
"strings" |
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.
File is not goimports
-ed (from goimports
)
"strings" |
x/bank/client/cli/query.go
Outdated
if denom == "" { | ||
var balances sdk.Coins | ||
if err := m.UnmarshalJSON(res, &balances); err != nil { | ||
params := &types.QueryAllBalancesParams{addr} |
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.
composites: github.com/cosmos/cosmos-sdk/x/bank/types.QueryAllBalancesParams
composite literal uses unkeyed fields (from govet
)
x/bank/client/cli/query.go
Outdated
} else { | ||
var balance sdk.Coin | ||
if err := m.UnmarshalJSON(res, &balance); err != nil { | ||
params := &types.QueryBalanceParams{addr, denom} |
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.
composites: github.com/cosmos/cosmos-sdk/x/bank/types.QueryBalanceParams
composite literal uses unkeyed fields (from govet
)
x/bank/keeper/querier.go
Outdated
return bz, nil | ||
func (q Querier) QueryAllBalances(ctx context.Context, params *types.QueryAllBalancesParams) (*types.QueryAllBalancesResponse, error) { | ||
balances := q.GetAllBalances(sdk.UnwrapSDKContext(ctx), params.Address) | ||
return &types.QueryAllBalancesResponse{balances}, nil |
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.
composites: github.com/cosmos/cosmos-sdk/x/bank/types.QueryAllBalancesResponse
composite literal uses unkeyed fields (from govet
)
x/bank/module.go
Outdated
@@ -77,6 +78,10 @@ type AppModule struct { | |||
accountKeeper types.AccountKeeper | |||
} | |||
|
|||
func (am AppModule) RegisterQueryServer(server grpc.Server) { | |||
types.RegisterQueryServer(server, keeper.Querier{am.keeper}) |
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.
composites: github.com/cosmos/cosmos-sdk/x/bank/keeper.Querier
composite literal uses unkeyed fields (from govet
)
This pull request introduces 1 alert when merging 6a871458bec647f046473d0aa1064029214159b4 into 2a7a408 - view on LGTM.com new alerts:
|
Codecov Report
@@ Coverage Diff @@
## master #5882 +/- ##
==========================================
+ Coverage 56.50% 56.78% +0.27%
==========================================
Files 342 342
Lines 20278 20047 -231
==========================================
- Hits 11459 11383 -76
+ Misses 7971 7815 -156
- Partials 848 849 +1 |
6a87145
to
1c6b0b3
Compare
This pull request introduces 1 alert when merging 1c6b0b3 into 7325692 - view on LGTM.com new alerts:
|
Replaced by #5953 so that the branch isn't from our fork. |
Closes: #XXX
Description
For contributor use:
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerFor admin use:
WIP
,R4R
,docs
, etc)