去掉依赖

This commit is contained in:
lu7213 committed 2026-11-15 09:54:17 -05:00
1 parent 7cb16bc84d
commit 4c4fd99fc4
6 files changed
+90 -24

No files matched your search

@@ -4,9 +4,9 @@ import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import org.junit.Assume;
import org.junit.Test;
import org.tron.api.GrpcAPI;
import org.tron.api.WalletGrpc;
import org.tron.protos.Protocol;
import org.tron.trident.api.GrpcAPI;
import org.tron.trident.api.WalletGrpc;
import org.tron.trident.proto.Chain;
import java.util.concurrent.TimeUnit;
@@ -25,7 +25,7 @@ public class TronGrpcConnectivityTest {
private void assertLatestBlock(String host) throws Exception {
ManagedChannel channel = ManagedChannelBuilder.forAddress(host, 50051).usePlaintext().build();
try {
Protocol.Block block = WalletGrpc.newBlockingStub(channel)
Chain.Block block = WalletGrpc.newBlockingStub(channel)
.withDeadlineAfter(60, TimeUnit.SECONDS)
.getNowBlock(GrpcAPI.EmptyMessage.getDefaultInstance());
assertTrue(host + " 未返回有效区块", block.hasBlockHeader()