-
Notifications
You must be signed in to change notification settings - Fork 44
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: support multi gRPC query clients serve with old binary (backport: #1603) #308
base: release/v0.20.x-cronos
Are you sure you want to change the base?
feat: support multi gRPC query clients serve with old binary (backport: #1603) #308
Conversation
This reverts commit f3ffda3.
for k, v := range data { | ||
backupGRPCBlockAddressBlockRange[v] = k | ||
} |
Check failure
Code scanning / gosec
the value in the range statement should be _ unless copying a map: want: for key := range m Error
for blocks, client := range b.backupQueryClients { | ||
// b1-b2 -> g1 | ||
// b3-b4 -> g2 | ||
if int64(blocks[0]) <= height && int64(blocks[1]) >= height { | ||
return client | ||
} | ||
} |
Check failure
Code scanning / gosec
the value in the range statement should be _ unless copying a map: want: for key := range m Error
for key, conn := range backupGRPCClientConns { | ||
backend.backupQueryClients[key] = &rpctypes.QueryClient{ | ||
ServiceClient: tx.NewServiceClient(conn), | ||
QueryClient: evmtypes.NewQueryClient(conn), | ||
FeeMarket: feemarkettypes.NewQueryClient(conn), | ||
} | ||
} |
Check failure
Code scanning / gosec
the value in the range statement should be _ unless copying a map: want: for key := range m Error
for k, address := range grpcBlockAddresses { | ||
grpcAddr, err := parseGrpcAddress(address) | ||
if err != nil { | ||
return err | ||
} | ||
c, err := grpc.Dial( | ||
grpcAddr, | ||
grpc.WithTransportCredentials(insecure.NewCredentials()), | ||
grpc.WithDefaultCallOptions( | ||
grpc.ForceCodec(codec.NewProtoCodec(clientCtx.InterfaceRegistry).GRPCCodec()), | ||
grpc.MaxCallRecvMsgSize(maxRecvMsgSize), | ||
grpc.MaxCallSendMsgSize(maxSendMsgSize), | ||
), | ||
) | ||
if err != nil { | ||
return err | ||
} | ||
backupGRPCClientConns[k] = c | ||
} |
Check failure
Code scanning / gosec
the value in the range statement should be _ unless copying a map: want: for key := range m Error
Codecov Report
@@ Coverage Diff @@
## release/v0.20.x-cronos #308 +/- ##
==========================================================
- Coverage 52.56% 52.43% -0.14%
==========================================================
Files 113 113
Lines 11073 11131 +58
==========================================================
+ Hits 5820 5836 +16
- Misses 5006 5045 +39
- Partials 247 250 +3
|
for more info
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)