Update clients according to API updates
This commit is contained in:
@@ -51,6 +51,40 @@ public class TransactionLedgerClient {
|
||||
channel.shutdown().awaitTermination(5, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
/**
|
||||
* <a
|
||||
* href="https://phabricator.internetapi.cn/w/public/bdchain/grpc-api/#clientversion">查询节点客户端版本</a>
|
||||
* (非阻塞)
|
||||
*/
|
||||
public ListenableFuture<ClientVersionResponse> clientVersion() {
|
||||
|
||||
info("*** clientVersion");
|
||||
|
||||
try {
|
||||
return futureStub.clientVersion(Empty.getDefaultInstance());
|
||||
} catch (StatusRuntimeException e) {
|
||||
warning("RPC failed: {0}", e.getStatus());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <a
|
||||
* href="https://phabricator.internetapi.cn/w/public/bdchain/grpc-api/#clientversion">查询节点客户端版本</a>
|
||||
* (阻塞)
|
||||
*/
|
||||
public ClientVersionResponse clientVersionSync() {
|
||||
|
||||
info("*** clientVersionSync");
|
||||
|
||||
try {
|
||||
return blockingStub.clientVersion(Empty.getDefaultInstance());
|
||||
} catch (StatusRuntimeException e) {
|
||||
warning("RPC failed: {0}", e.getStatus());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <a href="https://phabricator.internetapi.cn/w/public/bdchain/grpc-api/#createledger">创建账本</a>
|
||||
* (非阻塞)
|
||||
|
||||
Reference in New Issue
Block a user