Skip to content

Commit aad6911

Browse files
committed
feat(rpc): upgrade grpc
1 parent 7bac752 commit aad6911

475 files changed

Lines changed: 788 additions & 788 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/implement-a-customized-actuator-en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ public class SumActuatorTest {
234234
appTest.startServices();
235235
appTest.startup();
236236
channelFull = ManagedChannelBuilder.forTarget(serviceNode)
237-
.usePlaintext(true)
237+
.usePlaintext()
238238
.build();
239239
blockingStubFull = WalletGrpc.newBlockingStub(channelFull);
240240
}

docs/implement-a-customized-actuator-zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public class SumActuatorTest {
236236
appTest.startServices();
237237
appTest.startup();
238238
channelFull = ManagedChannelBuilder.forTarget(serviceNode)
239-
.usePlaintext(true)
239+
.usePlaintext()
240240
.build();
241241
blockingStubFull = WalletGrpc.newBlockingStub(channelFull);
242242
}

framework/src/main/java/org/tron/common/client/DatabaseGrpcClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ public class DatabaseGrpcClient {
1515

1616
public DatabaseGrpcClient(String host, int port) {
1717
channel = ManagedChannelBuilder.forAddress(host, port)
18-
.usePlaintext(true)
18+
.usePlaintext()
1919
.build();
2020
databaseBlockingStub = DatabaseGrpc.newBlockingStub(channel);
2121
}
2222

2323
public DatabaseGrpcClient(String host) {
2424
channel = ManagedChannelBuilder.forTarget(host)
25-
.usePlaintext(true)
25+
.usePlaintext()
2626
.build();
2727
databaseBlockingStub = DatabaseGrpc.newBlockingStub(channel);
2828
}

framework/src/main/java/org/tron/common/client/WalletGrpcClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ public class WalletGrpcClient {
2929

3030
public WalletGrpcClient(String host, int port) {
3131
channel = ManagedChannelBuilder.forAddress(host, port)
32-
.usePlaintext(true)
32+
.usePlaintext()
3333
.build();
3434
walletBlockingStub = WalletGrpc.newBlockingStub(channel);
3535
}
3636

3737
public WalletGrpcClient(String host) {
3838
channel = ManagedChannelBuilder.forTarget(host)
39-
.usePlaintext(true)
39+
.usePlaintext()
4040
.build();
4141
walletBlockingStub = WalletGrpc.newBlockingStub(channel);
4242
}

framework/src/test/java/org/tron/core/CreateCommonTransactionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class CreateCommonTransactionTest {
2323
*/
2424
public static void testCreateUpdateBrokerageContract() {
2525
WalletBlockingStub walletStub = WalletGrpc
26-
.newBlockingStub(ManagedChannelBuilder.forTarget(fullnode).usePlaintext(true).build());
26+
.newBlockingStub(ManagedChannelBuilder.forTarget(fullnode).usePlaintext().build());
2727
UpdateBrokerageContract.Builder updateBrokerageContract = UpdateBrokerageContract.newBuilder();
2828
updateBrokerageContract.setOwnerAddress(
2929
ByteString.copyFrom(decodeFromBase58Check("TN3zfjYUmMFK3ZsHSsrdJoNRtGkQmZLBLz")))

framework/src/test/java/org/tron/core/services/DelegationServiceTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public DelegationServiceTest(TronApplicationContext context) {
3333
public static void testGrpc() {
3434
WalletBlockingStub walletStub = WalletGrpc
3535
.newBlockingStub(ManagedChannelBuilder.forTarget(fullnode)
36-
.usePlaintext(true)
36+
.usePlaintext()
3737
.build());
3838
BytesMessage.Builder builder = BytesMessage.newBuilder();
3939
builder.setValue(ByteString.copyFromUtf8("TLTDZBcPoJ8tZ6TTEeEqEvwYFk2wgotSfD"));

framework/src/test/java/org/tron/core/services/NodeInfoServiceTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public void test() {
4444
public void testGrpc() {
4545
WalletBlockingStub walletStub = WalletGrpc
4646
.newBlockingStub(ManagedChannelBuilder.forTarget(fullnode)
47-
.usePlaintext(true)
47+
.usePlaintext()
4848
.build());
4949
logger.info("getNodeInfo: {}", walletStub.getNodeInfo(EmptyMessage.getDefaultInstance()));
5050
}

framework/src/test/java/org/tron/core/services/filter/LiteFnQueryGrpcInterceptorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ public void init() {
5959
String pBFTNode = String.format("%s:%d", Args.getInstance().getNodeDiscoveryBindIp(),
6060
Args.getInstance().getRpcOnPBFTPort());
6161
channelFull = ManagedChannelBuilder.forTarget(fullnode)
62-
.usePlaintext(true)
62+
.usePlaintext()
6363
.build();
6464
channelpBFT = ManagedChannelBuilder.forTarget(pBFTNode)
65-
.usePlaintext(true)
65+
.usePlaintext()
6666
.build();
6767
context = new TronApplicationContext(DefaultConfig.class);
6868
blockingStubFull = WalletGrpc.newBlockingStub(channelFull);

framework/src/test/java/org/tron/program/LiteFullNodeToolTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public void startApp() {
6464
String fullnode = String.format("%s:%d", "127.0.0.1",
6565
Args.getInstance().getRpcPort());
6666
ManagedChannel channelFull = ManagedChannelBuilder.forTarget(fullnode)
67-
.usePlaintext(true)
67+
.usePlaintext()
6868
.build();
6969
blockingStubFull = WalletGrpc.newBlockingStub(channelFull);
7070
}

framework/src/test/java/stest/tron/wallet/account/BrokerageTest001.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,22 +53,22 @@ public class BrokerageTest001 {
5353
public void beforeClass() {
5454

5555
channelFull = ManagedChannelBuilder.forTarget(fullnode)
56-
.usePlaintext(true)
56+
.usePlaintext()
5757
.build();
5858
blockingStubFull = WalletGrpc.newBlockingStub(channelFull);
5959

6060
channelSolidity = ManagedChannelBuilder.forTarget(soliditynode)
61-
.usePlaintext(true)
61+
.usePlaintext()
6262
.build();
6363
blockingStubSolidity = WalletSolidityGrpc.newBlockingStub(channelSolidity);
6464

6565
channelSoliInFull = ManagedChannelBuilder.forTarget(soliInFullnode)
66-
.usePlaintext(true)
66+
.usePlaintext()
6767
.build();
6868
blockingStubSoliInFull = WalletSolidityGrpc.newBlockingStub(channelSoliInFull);
6969

7070
channelPbft = ManagedChannelBuilder.forTarget(soliInPbft)
71-
.usePlaintext(true)
71+
.usePlaintext()
7272
.build();
7373
blockingStubPbft = WalletSolidityGrpc.newBlockingStub(channelPbft);
7474

0 commit comments

Comments
 (0)