File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
framework/src/main/java/org/tron/common/client Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 11package org .tron .common .client ;
22
3+ import io .grpc .LoadBalancerRegistry ;
34import io .grpc .ManagedChannel ;
45import io .grpc .ManagedChannelBuilder ;
6+ import io .grpc .internal .PickFirstLoadBalancerProvider ;
57import org .tron .api .DatabaseGrpc ;
68import org .tron .api .GrpcAPI .EmptyMessage ;
79import org .tron .api .GrpcAPI .NumberMessage ;
@@ -13,6 +15,12 @@ public class DatabaseGrpcClient {
1315 private final ManagedChannel channel ;
1416 private final DatabaseGrpc .DatabaseBlockingStub databaseBlockingStub ;
1517
18+ static {
19+ LoadBalancerRegistry
20+ .getDefaultRegistry ()
21+ .register (new PickFirstLoadBalancerProvider ());
22+ }
23+
1624 public DatabaseGrpcClient (String host , int port ) {
1725 channel = ManagedChannelBuilder .forAddress (host , port )
1826 .usePlaintext ()
Original file line number Diff line number Diff line change 11apply plugin : ' com.google.protobuf'
22
33def protobufVersion = ' 3.25.5'
4- def grpcVersion = ' 1.52.1 '
4+ def grpcVersion = ' 1.60.0 '
55
66dependencies {
77 api group : ' com.google.protobuf' , name : ' protobuf-java' , version : protobufVersion
You can’t perform that action at this time.
0 commit comments