-
Notifications
You must be signed in to change notification settings - Fork 117
feat: support proxy with grpc-only mode #815
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
base: main
Are you sure you want to change the base?
Conversation
| for blocks, client := range b.BackupQueryClients { | ||
| // b1-b2 -> g1 | ||
| // b3-b4 -> g2 | ||
| if int64(blocks[0]) <= height && int64(blocks[1]) >= height { | ||
| return client | ||
| } | ||
| } |
Check warning
Code scanning / CodeQL
Iteration over map Warning
| for k, address := range grpcBlockAddresses { | ||
| grpcAddr, err := parseGrpcAddress(address) | ||
| if err != nil { | ||
| return nil, clientCtx, backupGRPCClientConns, err | ||
| } | ||
| c, err := grpc.NewClient( | ||
| grpcAddr, | ||
| grpc.WithTransportCredentials(insecure.NewCredentials()), | ||
| grpc.WithDefaultCallOptions( | ||
| grpc.ForceCodec(codec.NewProtoCodec(clientCtx.InterfaceRegistry).GRPCCodec()), | ||
| grpc.MaxCallRecvMsgSize(maxRecvMsgSize), | ||
| grpc.MaxCallSendMsgSize(maxSendMsgSize), | ||
| ), | ||
| ) | ||
| if err != nil { | ||
| return nil, clientCtx, backupGRPCClientConns, err | ||
| } | ||
| backupGRPCClientConns[k] = c | ||
| } |
Check warning
Code scanning / CodeQL
Iteration over map Warning
Codecov Report❌ Patch coverage is
❌ Your project check has failed because the head coverage (65.07%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #815 +/- ##
==========================================
+ Coverage 64.96% 65.07% +0.10%
==========================================
Files 317 317
Lines 21604 21661 +57
==========================================
+ Hits 14036 14096 +60
- Misses 6349 6400 +51
+ Partials 1219 1165 -54
🚀 New features to boost your workflow:
|
| for address, blockRange := range data { | ||
| if blockRange[0] < 0 || blockRange[1] < 0 { | ||
| return Config{}, fmt.Errorf("invalid block range [%d, %d] for address %s: block numbers cannot be negative", | ||
| blockRange[0], blockRange[1], address) | ||
| } | ||
| if blockRange[0] > blockRange[1] { | ||
| return Config{}, fmt.Errorf("invalid block range [%d, %d] for address %s: start block must be <= end block", | ||
| blockRange[0], blockRange[1], address) | ||
| } | ||
| backupGRPCBlockAddressBlockRange[blockRange] = address | ||
| } |
Check warning
Code scanning / CodeQL
Iteration over map Warning
Description
for test info
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
mainbranch