feat: support multi gRPC query clients serve with old binary (backport: #1603)#308
feat: support multi gRPC query clients serve with old binary (backport: #1603)#308mmsqe wants to merge 5 commits intocrypto-org-chain:release/v0.20.x-cronosfrom
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
| 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
| 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
| 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
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/)godoccomments.Unreleasedsection inCHANGELOG.mdFiles changedin the Github PR explorerFor admin use:
WIP,R4R,docs, etc)