-
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
Problem: backup grpc clients are not supported #475
base: develop
Are you sure you want to change the base?
Conversation
for k, address := range cfg.JSONRPC.BackupGRPCBlockAddressBlockRange { | ||
grpcAddr, err := srv.ParseGRPCAddress(address) | ||
if err != nil { | ||
continue | ||
} | ||
|
||
conn, err := grpc.Dial( | ||
grpcAddr, | ||
grpc.WithTransportCredentials(insecure.NewCredentials()), | ||
grpc.WithDefaultCallOptions( | ||
grpc.ForceCodec(codec.NewProtoCodec(interfaceRegistry).GRPCCodec()), | ||
grpc.MaxCallRecvMsgSize(maxRecvMsgSize), | ||
grpc.MaxCallSendMsgSize(maxSendMsgSize), | ||
), | ||
) | ||
if err != nil { | ||
continue | ||
} | ||
backupQueryClients[k] = queryClientFn(conn) | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
for k, v := range data { | ||
backupGRPCBlockAddressBlockRange[v] = k | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
for blocks, client := range k.backupQueryClients { | ||
if int64(blocks[0]) <= height && int64(blocks[1]) >= height { | ||
params, err := client.Params(c, req) | ||
return params, err | ||
} | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
for blocks, client := range k.backupQueryClients { | ||
if int64(blocks[0]) <= height && int64(blocks[1]) >= height { | ||
params, err := client.Params(c, req) | ||
return params, err | ||
} | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #475 +/- ##
===========================================
- Coverage 62.93% 62.64% -0.29%
===========================================
Files 126 126
Lines 9480 9541 +61
===========================================
+ Hits 5966 5977 +11
- Misses 2974 3021 +47
- Partials 540 543 +3
|
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)