-
Notifications
You must be signed in to change notification settings - Fork 118
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
Additional details and impacted files@@ Coverage Diff @@
## main #815 +/- ##
==========================================
- Coverage 65.19% 65.07% -0.13%
==========================================
Files 317 317
Lines 21612 21672 +60
==========================================
+ Hits 14090 14102 +12
- Misses 6358 6402 +44
- Partials 1164 1168 +4
🚀 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