chore: update API

This commit is contained in:
Nex 2020-09-23 11:03:12 +08:00
parent 7cf5b0f60f
commit 5a38f7ed81
11 changed files with 3262 additions and 2164 deletions

2
api

@ -1 +1 @@
Subproject commit d5e0c7e9e427827489c80bcb79ed2ea74a5eff48
Subproject commit 0845a71abad8aee67f858f491c715e4a24106865

View File

@ -1,19 +1,20 @@
package org.bdware.bdledger.api.grpc;
import io.grpc.Metadata;
import io.grpc.stub.MetadataUtils;
import org.bdware.bdledger.api.grpc.pb.*;
import org.bdware.bdledger.api.grpc.pb.Common.TransactionType;
import org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.*;
import org.bdware.bdledger.api.grpc.pb.NodeOuterClass.*;
import org.bdware.bdledger.api.grpc.pb.QueryOuterClass.*;
import org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest.IncludeTransactions;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.protobuf.ByteString;
import com.google.protobuf.Empty;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import io.grpc.Metadata;
import io.grpc.StatusRuntimeException;
import io.grpc.stub.MetadataUtils;
import org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType;
import org.bdware.bdledger.api.grpc.pb.LedgerGrpc;
import org.bdware.bdledger.api.grpc.pb.LedgerProto.*;
import org.bdware.bdledger.api.grpc.pb.NodeGrpc;
import org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse;
import org.bdware.bdledger.api.grpc.pb.QueryGrpc;
import org.bdware.bdledger.api.grpc.pb.QueryProto.*;
import java.time.ZonedDateTime;
import java.util.concurrent.TimeUnit;
@ -258,7 +259,7 @@ public class Client {
* href="#">返回哈希所指定的区块</a>
* 非阻塞
*/
public ListenableFuture<QueryOuterClass.GetBlockByHashResponse> getBlockByHash(
public ListenableFuture<GetBlockByHashResponse> getBlockByHash(
String ledger, String hash, boolean fullTransactions) {
info(
@ -430,7 +431,7 @@ public class Client {
}
}
private BlocksRequest blocksRequest(String ledger, long startTimestamp, long endTimestamp, BlocksRequest.IncludeTransactions includeTransactions) {
private BlocksRequest blocksRequest(String ledger, long startTimestamp, long endTimestamp, IncludeTransactions includeTransactions) {
BlocksRequest.Builder reqBuilder =
BlocksRequest.newBuilder().setLedger(ledger);
@ -441,7 +442,7 @@ public class Client {
reqBuilder.setEndTimestamp(endTimestamp);
}
if (includeTransactions == null) {
includeTransactions = BlocksRequest.IncludeTransactions.NONE;
includeTransactions = IncludeTransactions.NONE;
}
reqBuilder.setIncludeTransactions(includeTransactions);

View File

@ -3,8 +3,8 @@
package org.bdware.bdledger.api.grpc.pb;
public final class ErrorDetails {
private ErrorDetails() {}
public final class ErrorDetailsProto {
private ErrorDetailsProto() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
@ -25,7 +25,7 @@ public final class ErrorDetails {
*
* <code>repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
java.util.List<org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation>
java.util.List<org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation>
getFieldViolationsList();
/**
* <pre>
@ -34,7 +34,7 @@ public final class ErrorDetails {
*
* <code>repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation getFieldViolations(int index);
org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation getFieldViolations(int index);
/**
* <pre>
* Describes all violations in a client request.
@ -50,7 +50,7 @@ public final class ErrorDetails {
*
* <code>repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
java.util.List<? extends org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolationOrBuilder>
java.util.List<? extends org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolationOrBuilder>
getFieldViolationsOrBuilderList();
/**
* <pre>
@ -59,7 +59,7 @@ public final class ErrorDetails {
*
* <code>repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolationOrBuilder getFieldViolationsOrBuilder(
org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolationOrBuilder getFieldViolationsOrBuilder(
int index);
}
/**
@ -118,11 +118,11 @@ public final class ErrorDetails {
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
fieldViolations_ = new java.util.ArrayList<org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation>();
fieldViolations_ = new java.util.ArrayList<org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation>();
mutable_bitField0_ |= 0x00000001;
}
fieldViolations_.add(
input.readMessage(org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation.parser(), extensionRegistry));
input.readMessage(org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.parser(), extensionRegistry));
break;
}
default: {
@ -149,15 +149,15 @@ public final class ErrorDetails {
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.ErrorDetails.internal_static_bdware_bdledger_api_InvalidArgument_descriptor;
return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.internal_static_bdware_bdledger_api_InvalidArgument_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.bdware.bdledger.api.grpc.pb.ErrorDetails.internal_static_bdware_bdledger_api_InvalidArgument_fieldAccessorTable
return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.internal_static_bdware_bdledger_api_InvalidArgument_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.class, org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.Builder.class);
org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.class, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.Builder.class);
}
public interface FieldViolationOrBuilder extends
@ -292,15 +292,15 @@ public final class ErrorDetails {
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.ErrorDetails.internal_static_bdware_bdledger_api_InvalidArgument_FieldViolation_descriptor;
return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.internal_static_bdware_bdledger_api_InvalidArgument_FieldViolation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.bdware.bdledger.api.grpc.pb.ErrorDetails.internal_static_bdware_bdledger_api_InvalidArgument_FieldViolation_fieldAccessorTable
return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.internal_static_bdware_bdledger_api_InvalidArgument_FieldViolation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation.class, org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation.Builder.class);
org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.class, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.Builder.class);
}
public static final int FIELD_FIELD_NUMBER = 1;
@ -440,10 +440,10 @@ public final class ErrorDetails {
if (obj == this) {
return true;
}
if (!(obj instanceof org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation)) {
if (!(obj instanceof org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation)) {
return super.equals(obj);
}
org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation other = (org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation) obj;
org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation other = (org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation) obj;
if (!getField()
.equals(other.getField())) return false;
@ -469,69 +469,69 @@ public final class ErrorDetails {
return hash;
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation parseFrom(
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation parseFrom(
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation parseFrom(
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation parseFrom(
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation parseFrom(byte[] data)
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation parseFrom(
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation parseFrom(java.io.InputStream input)
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation parseFrom(
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation parseDelimitedFrom(java.io.InputStream input)
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation parseDelimitedFrom(
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation parseFrom(
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation parseFrom(
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@ -544,7 +544,7 @@ public final class ErrorDetails {
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation prototype) {
public static Builder newBuilder(org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@ -569,21 +569,21 @@ public final class ErrorDetails {
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bdware.bdledger.api.InvalidArgument.FieldViolation)
org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolationOrBuilder {
org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.ErrorDetails.internal_static_bdware_bdledger_api_InvalidArgument_FieldViolation_descriptor;
return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.internal_static_bdware_bdledger_api_InvalidArgument_FieldViolation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.bdware.bdledger.api.grpc.pb.ErrorDetails.internal_static_bdware_bdledger_api_InvalidArgument_FieldViolation_fieldAccessorTable
return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.internal_static_bdware_bdledger_api_InvalidArgument_FieldViolation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation.class, org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation.Builder.class);
org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.class, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.Builder.class);
}
// Construct using org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation.newBuilder()
// Construct using org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@ -611,17 +611,17 @@ public final class ErrorDetails {
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.bdware.bdledger.api.grpc.pb.ErrorDetails.internal_static_bdware_bdledger_api_InvalidArgument_FieldViolation_descriptor;
return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.internal_static_bdware_bdledger_api_InvalidArgument_FieldViolation_descriptor;
}
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation getDefaultInstanceForType() {
return org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation.getDefaultInstance();
public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation getDefaultInstanceForType() {
return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.getDefaultInstance();
}
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation build() {
org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation result = buildPartial();
public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation build() {
org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@ -629,8 +629,8 @@ public final class ErrorDetails {
}
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation buildPartial() {
org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation result = new org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation(this);
public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation buildPartial() {
org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation result = new org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation(this);
result.field_ = field_;
result.description_ = description_;
onBuilt();
@ -671,16 +671,16 @@ public final class ErrorDetails {
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation) {
return mergeFrom((org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation)other);
if (other instanceof org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation) {
return mergeFrom((org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation other) {
if (other == org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation.getDefaultInstance()) return this;
public Builder mergeFrom(org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation other) {
if (other == org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.getDefaultInstance()) return this;
if (!other.getField().isEmpty()) {
field_ = other.field_;
onChanged();
@ -704,11 +704,11 @@ public final class ErrorDetails {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation parsedMessage = null;
org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation) e.getUnfinishedMessage();
parsedMessage = (org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
@ -936,12 +936,12 @@ public final class ErrorDetails {
}
// @@protoc_insertion_point(class_scope:bdware.bdledger.api.InvalidArgument.FieldViolation)
private static final org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation DEFAULT_INSTANCE;
private static final org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation();
DEFAULT_INSTANCE = new org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation();
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation getDefaultInstance() {
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@ -966,14 +966,14 @@ public final class ErrorDetails {
}
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation getDefaultInstanceForType() {
public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int FIELD_VIOLATIONS_FIELD_NUMBER = 1;
private java.util.List<org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation> fieldViolations_;
private java.util.List<org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation> fieldViolations_;
/**
* <pre>
* Describes all violations in a client request.
@ -981,7 +981,7 @@ public final class ErrorDetails {
*
* <code>repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
public java.util.List<org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation> getFieldViolationsList() {
public java.util.List<org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation> getFieldViolationsList() {
return fieldViolations_;
}
/**
@ -991,7 +991,7 @@ public final class ErrorDetails {
*
* <code>repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
public java.util.List<? extends org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolationOrBuilder>
public java.util.List<? extends org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolationOrBuilder>
getFieldViolationsOrBuilderList() {
return fieldViolations_;
}
@ -1012,7 +1012,7 @@ public final class ErrorDetails {
*
* <code>repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
public org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation getFieldViolations(int index) {
public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation getFieldViolations(int index) {
return fieldViolations_.get(index);
}
/**
@ -1022,7 +1022,7 @@ public final class ErrorDetails {
*
* <code>repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
public org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolationOrBuilder getFieldViolationsOrBuilder(
public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolationOrBuilder getFieldViolationsOrBuilder(
int index) {
return fieldViolations_.get(index);
}
@ -1067,10 +1067,10 @@ public final class ErrorDetails {
if (obj == this) {
return true;
}
if (!(obj instanceof org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument)) {
if (!(obj instanceof org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument)) {
return super.equals(obj);
}
org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument other = (org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument) obj;
org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument other = (org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument) obj;
if (!getFieldViolationsList()
.equals(other.getFieldViolationsList())) return false;
@ -1094,69 +1094,69 @@ public final class ErrorDetails {
return hash;
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument parseFrom(
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument parseFrom(
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument parseFrom(
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument parseFrom(
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument parseFrom(byte[] data)
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument parseFrom(
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument parseFrom(java.io.InputStream input)
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument parseFrom(
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument parseDelimitedFrom(java.io.InputStream input)
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument parseDelimitedFrom(
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument parseFrom(
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument parseFrom(
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@ -1169,7 +1169,7 @@ public final class ErrorDetails {
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument prototype) {
public static Builder newBuilder(org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@ -1197,21 +1197,21 @@ public final class ErrorDetails {
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bdware.bdledger.api.InvalidArgument)
org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgumentOrBuilder {
org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgumentOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.ErrorDetails.internal_static_bdware_bdledger_api_InvalidArgument_descriptor;
return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.internal_static_bdware_bdledger_api_InvalidArgument_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.bdware.bdledger.api.grpc.pb.ErrorDetails.internal_static_bdware_bdledger_api_InvalidArgument_fieldAccessorTable
return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.internal_static_bdware_bdledger_api_InvalidArgument_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.class, org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.Builder.class);
org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.class, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.Builder.class);
}
// Construct using org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.newBuilder()
// Construct using org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@ -1242,17 +1242,17 @@ public final class ErrorDetails {
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.bdware.bdledger.api.grpc.pb.ErrorDetails.internal_static_bdware_bdledger_api_InvalidArgument_descriptor;
return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.internal_static_bdware_bdledger_api_InvalidArgument_descriptor;
}
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument getDefaultInstanceForType() {
return org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.getDefaultInstance();
public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument getDefaultInstanceForType() {
return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.getDefaultInstance();
}
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument build() {
org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument result = buildPartial();
public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument build() {
org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@ -1260,8 +1260,8 @@ public final class ErrorDetails {
}
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument buildPartial() {
org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument result = new org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument(this);
public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument buildPartial() {
org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument result = new org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument(this);
int from_bitField0_ = bitField0_;
if (fieldViolationsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
@ -1310,16 +1310,16 @@ public final class ErrorDetails {
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument) {
return mergeFrom((org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument)other);
if (other instanceof org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument) {
return mergeFrom((org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument other) {
if (other == org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.getDefaultInstance()) return this;
public Builder mergeFrom(org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument other) {
if (other == org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.getDefaultInstance()) return this;
if (fieldViolationsBuilder_ == null) {
if (!other.fieldViolations_.isEmpty()) {
if (fieldViolations_.isEmpty()) {
@ -1361,11 +1361,11 @@ public final class ErrorDetails {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument parsedMessage = null;
org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument) e.getUnfinishedMessage();
parsedMessage = (org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
@ -1376,17 +1376,17 @@ public final class ErrorDetails {
}
private int bitField0_;
private java.util.List<org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation> fieldViolations_ =
private java.util.List<org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation> fieldViolations_ =
java.util.Collections.emptyList();
private void ensureFieldViolationsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
fieldViolations_ = new java.util.ArrayList<org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation>(fieldViolations_);
fieldViolations_ = new java.util.ArrayList<org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation>(fieldViolations_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation, org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation.Builder, org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolationOrBuilder> fieldViolationsBuilder_;
org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.Builder, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolationOrBuilder> fieldViolationsBuilder_;
/**
* <pre>
@ -1395,7 +1395,7 @@ public final class ErrorDetails {
*
* <code>repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
public java.util.List<org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation> getFieldViolationsList() {
public java.util.List<org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation> getFieldViolationsList() {
if (fieldViolationsBuilder_ == null) {
return java.util.Collections.unmodifiableList(fieldViolations_);
} else {
@ -1423,7 +1423,7 @@ public final class ErrorDetails {
*
* <code>repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
public org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation getFieldViolations(int index) {
public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation getFieldViolations(int index) {
if (fieldViolationsBuilder_ == null) {
return fieldViolations_.get(index);
} else {
@ -1438,7 +1438,7 @@ public final class ErrorDetails {
* <code>repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
public Builder setFieldViolations(
int index, org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation value) {
int index, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation value) {
if (fieldViolationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
@ -1459,7 +1459,7 @@ public final class ErrorDetails {
* <code>repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
public Builder setFieldViolations(
int index, org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation.Builder builderForValue) {
int index, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.Builder builderForValue) {
if (fieldViolationsBuilder_ == null) {
ensureFieldViolationsIsMutable();
fieldViolations_.set(index, builderForValue.build());
@ -1476,7 +1476,7 @@ public final class ErrorDetails {
*
* <code>repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
public Builder addFieldViolations(org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation value) {
public Builder addFieldViolations(org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation value) {
if (fieldViolationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
@ -1497,7 +1497,7 @@ public final class ErrorDetails {
* <code>repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
public Builder addFieldViolations(
int index, org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation value) {
int index, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation value) {
if (fieldViolationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
@ -1518,7 +1518,7 @@ public final class ErrorDetails {
* <code>repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
public Builder addFieldViolations(
org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation.Builder builderForValue) {
org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.Builder builderForValue) {
if (fieldViolationsBuilder_ == null) {
ensureFieldViolationsIsMutable();
fieldViolations_.add(builderForValue.build());
@ -1536,7 +1536,7 @@ public final class ErrorDetails {
* <code>repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
public Builder addFieldViolations(
int index, org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation.Builder builderForValue) {
int index, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.Builder builderForValue) {
if (fieldViolationsBuilder_ == null) {
ensureFieldViolationsIsMutable();
fieldViolations_.add(index, builderForValue.build());
@ -1554,7 +1554,7 @@ public final class ErrorDetails {
* <code>repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
public Builder addAllFieldViolations(
java.lang.Iterable<? extends org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation> values) {
java.lang.Iterable<? extends org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation> values) {
if (fieldViolationsBuilder_ == null) {
ensureFieldViolationsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
@ -1606,7 +1606,7 @@ public final class ErrorDetails {
*
* <code>repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
public org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation.Builder getFieldViolationsBuilder(
public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.Builder getFieldViolationsBuilder(
int index) {
return getFieldViolationsFieldBuilder().getBuilder(index);
}
@ -1617,7 +1617,7 @@ public final class ErrorDetails {
*
* <code>repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
public org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolationOrBuilder getFieldViolationsOrBuilder(
public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolationOrBuilder getFieldViolationsOrBuilder(
int index) {
if (fieldViolationsBuilder_ == null) {
return fieldViolations_.get(index); } else {
@ -1631,7 +1631,7 @@ public final class ErrorDetails {
*
* <code>repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
public java.util.List<? extends org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolationOrBuilder>
public java.util.List<? extends org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolationOrBuilder>
getFieldViolationsOrBuilderList() {
if (fieldViolationsBuilder_ != null) {
return fieldViolationsBuilder_.getMessageOrBuilderList();
@ -1646,9 +1646,9 @@ public final class ErrorDetails {
*
* <code>repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
public org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation.Builder addFieldViolationsBuilder() {
public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.Builder addFieldViolationsBuilder() {
return getFieldViolationsFieldBuilder().addBuilder(
org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation.getDefaultInstance());
org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.getDefaultInstance());
}
/**
* <pre>
@ -1657,10 +1657,10 @@ public final class ErrorDetails {
*
* <code>repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
public org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation.Builder addFieldViolationsBuilder(
public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.Builder addFieldViolationsBuilder(
int index) {
return getFieldViolationsFieldBuilder().addBuilder(
index, org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation.getDefaultInstance());
index, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.getDefaultInstance());
}
/**
* <pre>
@ -1669,16 +1669,16 @@ public final class ErrorDetails {
*
* <code>repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
public java.util.List<org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation.Builder>
public java.util.List<org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.Builder>
getFieldViolationsBuilderList() {
return getFieldViolationsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation, org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation.Builder, org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolationOrBuilder>
org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.Builder, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolationOrBuilder>
getFieldViolationsFieldBuilder() {
if (fieldViolationsBuilder_ == null) {
fieldViolationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation, org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolation.Builder, org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument.FieldViolationOrBuilder>(
org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.Builder, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolationOrBuilder>(
fieldViolations_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
@ -1704,12 +1704,12 @@ public final class ErrorDetails {
}
// @@protoc_insertion_point(class_scope:bdware.bdledger.api.InvalidArgument)
private static final org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument DEFAULT_INSTANCE;
private static final org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument();
DEFAULT_INSTANCE = new org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument();
}
public static org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument getDefaultInstance() {
public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@ -1734,7 +1734,7 @@ public final class ErrorDetails {
}
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.ErrorDetails.InvalidArgument getDefaultInstanceForType() {
public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
@ -1764,9 +1764,9 @@ public final class ErrorDetails {
"nt\022M\n\020field_violations\030\001 \003(\01323.bdware.bd" +
"ledger.api.InvalidArgument.FieldViolatio" +
"n\0324\n\016FieldViolation\022\r\n\005field\030\001 \001(\t\022\023\n\013de" +
"scription\030\002 \001(\tBI\n\037org.bdware.bdledger.a" +
"pi.grpc.pbZ&bdware.org/bdledger/pkg/api/" +
"grpc/apipbb\006proto3"
"scription\030\002 \001(\tB_\n\037org.bdware.bdledger.a" +
"pi.grpc.pbB\021ErrorDetailsProtoZ)bdware.or" +
"g/bdledger/pkg/api/grpc/pb;apipbb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,

View File

@ -18,7 +18,7 @@ import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.30.2)",
value = "by gRPC proto compiler (version 1.32.1)",
comments = "Source: bdware/bdledger/api/ledger.proto")
public final class LedgerGrpc {
@ -27,29 +27,29 @@ public final class LedgerGrpc {
public static final String SERVICE_NAME = "bdware.bdledger.api.Ledger";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerRequest,
org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerResponse> getCreateLedgerMethod;
private static volatile io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest,
org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse> getCreateLedgerMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "CreateLedger",
requestType = org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerRequest.class,
responseType = org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerResponse.class,
requestType = org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest.class,
responseType = org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerRequest,
org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerResponse> getCreateLedgerMethod() {
io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerRequest, org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerResponse> getCreateLedgerMethod;
public static io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest,
org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse> getCreateLedgerMethod() {
io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest, org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse> getCreateLedgerMethod;
if ((getCreateLedgerMethod = LedgerGrpc.getCreateLedgerMethod) == null) {
synchronized (LedgerGrpc.class) {
if ((getCreateLedgerMethod = LedgerGrpc.getCreateLedgerMethod) == null) {
LedgerGrpc.getCreateLedgerMethod = getCreateLedgerMethod =
io.grpc.MethodDescriptor.<org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerRequest, org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerResponse>newBuilder()
io.grpc.MethodDescriptor.<org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest, org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateLedger"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerRequest.getDefaultInstance()))
org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerResponse.getDefaultInstance()))
org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse.getDefaultInstance()))
.setSchemaDescriptor(new LedgerMethodDescriptorSupplier("CreateLedger"))
.build();
}
@ -59,28 +59,28 @@ public final class LedgerGrpc {
}
private static volatile io.grpc.MethodDescriptor<com.google.protobuf.Empty,
org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.GetLedgersResponse> getGetLedgersMethod;
org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse> getGetLedgersMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetLedgers",
requestType = com.google.protobuf.Empty.class,
responseType = org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.GetLedgersResponse.class,
responseType = org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<com.google.protobuf.Empty,
org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.GetLedgersResponse> getGetLedgersMethod() {
io.grpc.MethodDescriptor<com.google.protobuf.Empty, org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.GetLedgersResponse> getGetLedgersMethod;
org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse> getGetLedgersMethod() {
io.grpc.MethodDescriptor<com.google.protobuf.Empty, org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse> getGetLedgersMethod;
if ((getGetLedgersMethod = LedgerGrpc.getGetLedgersMethod) == null) {
synchronized (LedgerGrpc.class) {
if ((getGetLedgersMethod = LedgerGrpc.getGetLedgersMethod) == null) {
LedgerGrpc.getGetLedgersMethod = getGetLedgersMethod =
io.grpc.MethodDescriptor.<com.google.protobuf.Empty, org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.GetLedgersResponse>newBuilder()
io.grpc.MethodDescriptor.<com.google.protobuf.Empty, org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLedgers"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.protobuf.Empty.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.GetLedgersResponse.getDefaultInstance()))
org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse.getDefaultInstance()))
.setSchemaDescriptor(new LedgerMethodDescriptorSupplier("GetLedgers"))
.build();
}
@ -89,29 +89,29 @@ public final class LedgerGrpc {
return getGetLedgersMethod;
}
private static volatile io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionRequest,
org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionResponse> getSendTransactionMethod;
private static volatile io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest,
org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse> getSendTransactionMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "SendTransaction",
requestType = org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionRequest.class,
responseType = org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionResponse.class,
requestType = org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest.class,
responseType = org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionRequest,
org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionResponse> getSendTransactionMethod() {
io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionRequest, org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionResponse> getSendTransactionMethod;
public static io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest,
org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse> getSendTransactionMethod() {
io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest, org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse> getSendTransactionMethod;
if ((getSendTransactionMethod = LedgerGrpc.getSendTransactionMethod) == null) {
synchronized (LedgerGrpc.class) {
if ((getSendTransactionMethod = LedgerGrpc.getSendTransactionMethod) == null) {
LedgerGrpc.getSendTransactionMethod = getSendTransactionMethod =
io.grpc.MethodDescriptor.<org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionRequest, org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionResponse>newBuilder()
io.grpc.MethodDescriptor.<org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest, org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "SendTransaction"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionRequest.getDefaultInstance()))
org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionResponse.getDefaultInstance()))
org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse.getDefaultInstance()))
.setSchemaDescriptor(new LedgerMethodDescriptorSupplier("SendTransaction"))
.build();
}
@ -175,8 +175,8 @@ public final class LedgerGrpc {
* 创建一个新账本
* </pre>
*/
public void createLedger(org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerResponse> responseObserver) {
public void createLedger(org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse> responseObserver) {
asyncUnimplementedUnaryCall(getCreateLedgerMethod(), responseObserver);
}
@ -188,7 +188,7 @@ public final class LedgerGrpc {
* </pre>
*/
public void getLedgers(com.google.protobuf.Empty request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.GetLedgersResponse> responseObserver) {
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse> responseObserver) {
asyncUnimplementedUnaryCall(getGetLedgersMethod(), responseObserver);
}
@ -199,8 +199,8 @@ public final class LedgerGrpc {
* 发送一个新事务
* </pre>
*/
public void sendTransaction(org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionResponse> responseObserver) {
public void sendTransaction(org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse> responseObserver) {
asyncUnimplementedUnaryCall(getSendTransactionMethod(), responseObserver);
}
@ -210,22 +210,22 @@ public final class LedgerGrpc {
getCreateLedgerMethod(),
asyncUnaryCall(
new MethodHandlers<
org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerRequest,
org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerResponse>(
org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest,
org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse>(
this, METHODID_CREATE_LEDGER)))
.addMethod(
getGetLedgersMethod(),
asyncUnaryCall(
new MethodHandlers<
com.google.protobuf.Empty,
org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.GetLedgersResponse>(
org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse>(
this, METHODID_GET_LEDGERS)))
.addMethod(
getSendTransactionMethod(),
asyncUnaryCall(
new MethodHandlers<
org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionRequest,
org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionResponse>(
org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest,
org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse>(
this, METHODID_SEND_TRANSACTION)))
.build();
}
@ -252,8 +252,8 @@ public final class LedgerGrpc {
* 创建一个新账本
* </pre>
*/
public void createLedger(org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerResponse> responseObserver) {
public void createLedger(org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getCreateLedgerMethod(), getCallOptions()), request, responseObserver);
}
@ -266,7 +266,7 @@ public final class LedgerGrpc {
* </pre>
*/
public void getLedgers(com.google.protobuf.Empty request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.GetLedgersResponse> responseObserver) {
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetLedgersMethod(), getCallOptions()), request, responseObserver);
}
@ -278,8 +278,8 @@ public final class LedgerGrpc {
* 发送一个新事务
* </pre>
*/
public void sendTransaction(org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionResponse> responseObserver) {
public void sendTransaction(org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getSendTransactionMethod(), getCallOptions()), request, responseObserver);
}
@ -306,7 +306,7 @@ public final class LedgerGrpc {
* 创建一个新账本
* </pre>
*/
public org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerResponse createLedger(org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerRequest request) {
public org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse createLedger(org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest request) {
return blockingUnaryCall(
getChannel(), getCreateLedgerMethod(), getCallOptions(), request);
}
@ -318,7 +318,7 @@ public final class LedgerGrpc {
* 查询所有帐本列表
* </pre>
*/
public org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.GetLedgersResponse getLedgers(com.google.protobuf.Empty request) {
public org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse getLedgers(com.google.protobuf.Empty request) {
return blockingUnaryCall(
getChannel(), getGetLedgersMethod(), getCallOptions(), request);
}
@ -330,7 +330,7 @@ public final class LedgerGrpc {
* 发送一个新事务
* </pre>
*/
public org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionResponse sendTransaction(org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionRequest request) {
public org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse sendTransaction(org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest request) {
return blockingUnaryCall(
getChannel(), getSendTransactionMethod(), getCallOptions(), request);
}
@ -357,8 +357,8 @@ public final class LedgerGrpc {
* 创建一个新账本
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerResponse> createLedger(
org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerRequest request) {
public com.google.common.util.concurrent.ListenableFuture<org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse> createLedger(
org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest request) {
return futureUnaryCall(
getChannel().newCall(getCreateLedgerMethod(), getCallOptions()), request);
}
@ -370,7 +370,7 @@ public final class LedgerGrpc {
* 查询所有帐本列表
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.GetLedgersResponse> getLedgers(
public com.google.common.util.concurrent.ListenableFuture<org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse> getLedgers(
com.google.protobuf.Empty request) {
return futureUnaryCall(
getChannel().newCall(getGetLedgersMethod(), getCallOptions()), request);
@ -383,8 +383,8 @@ public final class LedgerGrpc {
* 发送一个新事务
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionResponse> sendTransaction(
org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionRequest request) {
public com.google.common.util.concurrent.ListenableFuture<org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse> sendTransaction(
org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest request) {
return futureUnaryCall(
getChannel().newCall(getSendTransactionMethod(), getCallOptions()), request);
}
@ -412,16 +412,16 @@ public final class LedgerGrpc {
public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
switch (methodId) {
case METHODID_CREATE_LEDGER:
serviceImpl.createLedger((org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerRequest) request,
(io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.CreateLedgerResponse>) responseObserver);
serviceImpl.createLedger((org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest) request,
(io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse>) responseObserver);
break;
case METHODID_GET_LEDGERS:
serviceImpl.getLedgers((com.google.protobuf.Empty) request,
(io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.GetLedgersResponse>) responseObserver);
(io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse>) responseObserver);
break;
case METHODID_SEND_TRANSACTION:
serviceImpl.sendTransaction((org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionRequest) request,
(io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.SendTransactionResponse>) responseObserver);
serviceImpl.sendTransaction((org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest) request,
(io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse>) responseObserver);
break;
default:
throw new AssertionError();
@ -445,7 +445,7 @@ public final class LedgerGrpc {
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.getDescriptor();
return org.bdware.bdledger.api.grpc.pb.LedgerProto.getDescriptor();
}
@java.lang.Override

View File

@ -18,7 +18,7 @@ import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.30.2)",
value = "by gRPC proto compiler (version 1.32.1)",
comments = "Source: bdware/bdledger/api/node.proto")
public final class NodeGrpc {
@ -28,28 +28,28 @@ public final class NodeGrpc {
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor<com.google.protobuf.Empty,
org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse> getClientVersionMethod;
org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse> getClientVersionMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ClientVersion",
requestType = com.google.protobuf.Empty.class,
responseType = org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse.class,
responseType = org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<com.google.protobuf.Empty,
org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse> getClientVersionMethod() {
io.grpc.MethodDescriptor<com.google.protobuf.Empty, org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse> getClientVersionMethod;
org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse> getClientVersionMethod() {
io.grpc.MethodDescriptor<com.google.protobuf.Empty, org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse> getClientVersionMethod;
if ((getClientVersionMethod = NodeGrpc.getClientVersionMethod) == null) {
synchronized (NodeGrpc.class) {
if ((getClientVersionMethod = NodeGrpc.getClientVersionMethod) == null) {
NodeGrpc.getClientVersionMethod = getClientVersionMethod =
io.grpc.MethodDescriptor.<com.google.protobuf.Empty, org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse>newBuilder()
io.grpc.MethodDescriptor.<com.google.protobuf.Empty, org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ClientVersion"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.protobuf.Empty.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse.getDefaultInstance()))
org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse.getDefaultInstance()))
.setSchemaDescriptor(new NodeMethodDescriptorSupplier("ClientVersion"))
.build();
}
@ -114,7 +114,7 @@ public final class NodeGrpc {
* </pre>
*/
public void clientVersion(com.google.protobuf.Empty request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse> responseObserver) {
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse> responseObserver) {
asyncUnimplementedUnaryCall(getClientVersionMethod(), responseObserver);
}
@ -125,7 +125,7 @@ public final class NodeGrpc {
asyncUnaryCall(
new MethodHandlers<
com.google.protobuf.Empty,
org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse>(
org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse>(
this, METHODID_CLIENT_VERSION)))
.build();
}
@ -153,7 +153,7 @@ public final class NodeGrpc {
* </pre>
*/
public void clientVersion(com.google.protobuf.Empty request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse> responseObserver) {
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getClientVersionMethod(), getCallOptions()), request, responseObserver);
}
@ -180,7 +180,7 @@ public final class NodeGrpc {
* 查询BDLedger节点版本
* </pre>
*/
public org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse clientVersion(com.google.protobuf.Empty request) {
public org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse clientVersion(com.google.protobuf.Empty request) {
return blockingUnaryCall(
getChannel(), getClientVersionMethod(), getCallOptions(), request);
}
@ -207,7 +207,7 @@ public final class NodeGrpc {
* 查询BDLedger节点版本
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse> clientVersion(
public com.google.common.util.concurrent.ListenableFuture<org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse> clientVersion(
com.google.protobuf.Empty request) {
return futureUnaryCall(
getChannel().newCall(getClientVersionMethod(), getCallOptions()), request);
@ -235,7 +235,7 @@ public final class NodeGrpc {
switch (methodId) {
case METHODID_CLIENT_VERSION:
serviceImpl.clientVersion((com.google.protobuf.Empty) request,
(io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse>) responseObserver);
(io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse>) responseObserver);
break;
default:
throw new AssertionError();
@ -259,7 +259,7 @@ public final class NodeGrpc {
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return org.bdware.bdledger.api.grpc.pb.NodeOuterClass.getDescriptor();
return org.bdware.bdledger.api.grpc.pb.NodeProto.getDescriptor();
}
@java.lang.Override

View File

@ -3,8 +3,8 @@
package org.bdware.bdledger.api.grpc.pb;
public final class NodeOuterClass {
private NodeOuterClass() {}
public final class NodeProto {
private NodeProto() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
@ -111,15 +111,15 @@ public final class NodeOuterClass {
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.NodeOuterClass.internal_static_bdware_bdledger_api_ClientVersionResponse_descriptor;
return org.bdware.bdledger.api.grpc.pb.NodeProto.internal_static_bdware_bdledger_api_ClientVersionResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.bdware.bdledger.api.grpc.pb.NodeOuterClass.internal_static_bdware_bdledger_api_ClientVersionResponse_fieldAccessorTable
return org.bdware.bdledger.api.grpc.pb.NodeProto.internal_static_bdware_bdledger_api_ClientVersionResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse.class, org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse.Builder.class);
org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse.class, org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse.Builder.class);
}
public static final int VERSION_FIELD_NUMBER = 1;
@ -205,10 +205,10 @@ public final class NodeOuterClass {
if (obj == this) {
return true;
}
if (!(obj instanceof org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse)) {
if (!(obj instanceof org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse)) {
return super.equals(obj);
}
org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse other = (org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse) obj;
org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse other = (org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse) obj;
if (!getVersion()
.equals(other.getVersion())) return false;
@ -230,69 +230,69 @@ public final class NodeOuterClass {
return hash;
}
public static org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse parseFrom(
public static org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse parseFrom(
public static org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse parseFrom(
public static org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse parseFrom(
public static org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse parseFrom(byte[] data)
public static org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse parseFrom(
public static org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse parseFrom(java.io.InputStream input)
public static org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse parseFrom(
public static org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse parseDelimitedFrom(java.io.InputStream input)
public static org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse parseDelimitedFrom(
public static org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse parseFrom(
public static org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse parseFrom(
public static org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@ -305,7 +305,7 @@ public final class NodeOuterClass {
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse prototype) {
public static Builder newBuilder(org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@ -326,21 +326,21 @@ public final class NodeOuterClass {
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bdware.bdledger.api.ClientVersionResponse)
org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponseOrBuilder {
org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bdware.bdledger.api.grpc.pb.NodeOuterClass.internal_static_bdware_bdledger_api_ClientVersionResponse_descriptor;
return org.bdware.bdledger.api.grpc.pb.NodeProto.internal_static_bdware_bdledger_api_ClientVersionResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.bdware.bdledger.api.grpc.pb.NodeOuterClass.internal_static_bdware_bdledger_api_ClientVersionResponse_fieldAccessorTable
return org.bdware.bdledger.api.grpc.pb.NodeProto.internal_static_bdware_bdledger_api_ClientVersionResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse.class, org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse.Builder.class);
org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse.class, org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse.Builder.class);
}
// Construct using org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse.newBuilder()
// Construct using org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@ -366,17 +366,17 @@ public final class NodeOuterClass {
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.bdware.bdledger.api.grpc.pb.NodeOuterClass.internal_static_bdware_bdledger_api_ClientVersionResponse_descriptor;
return org.bdware.bdledger.api.grpc.pb.NodeProto.internal_static_bdware_bdledger_api_ClientVersionResponse_descriptor;
}
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse getDefaultInstanceForType() {
return org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse.getDefaultInstance();
public org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse getDefaultInstanceForType() {
return org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse.getDefaultInstance();
}
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse build() {
org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse result = buildPartial();
public org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse build() {
org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@ -384,8 +384,8 @@ public final class NodeOuterClass {
}
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse buildPartial() {
org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse result = new org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse(this);
public org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse buildPartial() {
org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse result = new org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse(this);
result.version_ = version_;
onBuilt();
return result;
@ -425,16 +425,16 @@ public final class NodeOuterClass {
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse) {
return mergeFrom((org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse)other);
if (other instanceof org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse) {
return mergeFrom((org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse other) {
if (other == org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse.getDefaultInstance()) return this;
public Builder mergeFrom(org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse other) {
if (other == org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse.getDefaultInstance()) return this;
if (!other.getVersion().isEmpty()) {
version_ = other.version_;
onChanged();
@ -454,11 +454,11 @@ public final class NodeOuterClass {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse parsedMessage = null;
org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse) e.getUnfinishedMessage();
parsedMessage = (org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
@ -580,12 +580,12 @@ public final class NodeOuterClass {
}
// @@protoc_insertion_point(class_scope:bdware.bdledger.api.ClientVersionResponse)
private static final org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse DEFAULT_INSTANCE;
private static final org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse();
DEFAULT_INSTANCE = new org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse();
}
public static org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse getDefaultInstance() {
public static org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@ -610,7 +610,7 @@ public final class NodeOuterClass {
}
@java.lang.Override
public org.bdware.bdledger.api.grpc.pb.NodeOuterClass.ClientVersionResponse getDefaultInstanceForType() {
public org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
@ -635,9 +635,9 @@ public final class NodeOuterClass {
"to\"(\n\025ClientVersionResponse\022\017\n\007version\030\001" +
" \001(\t2[\n\004Node\022S\n\rClientVersion\022\026.google.p" +
"rotobuf.Empty\032*.bdware.bdledger.api.Clie" +
"ntVersionResponseBI\n\037org.bdware.bdledger" +
".api.grpc.pbZ&bdware.org/bdledger/pkg/ap" +
"i/grpc/apipbb\006proto3"
"ntVersionResponseBW\n\037org.bdware.bdledger" +
".api.grpc.pbB\tNodeProtoZ)bdware.org/bdle" +
"dger/pkg/api/grpc/pb;apipbb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,

View File

@ -18,7 +18,7 @@ import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.30.2)",
value = "by gRPC proto compiler (version 1.32.1)",
comments = "Source: bdware/bdledger/api/query.proto")
public final class QueryGrpc {
@ -27,29 +27,29 @@ public final class QueryGrpc {
public static final String SERVICE_NAME = "bdware.bdledger.api.Query";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashRequest,
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashResponse> getGetBlockByHashMethod;
private static volatile io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse> getGetBlockByHashMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetBlockByHash",
requestType = org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashRequest.class,
responseType = org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashResponse.class,
requestType = org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest.class,
responseType = org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashRequest,
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashResponse> getGetBlockByHashMethod() {
io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashRequest, org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashResponse> getGetBlockByHashMethod;
public static io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse> getGetBlockByHashMethod() {
io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest, org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse> getGetBlockByHashMethod;
if ((getGetBlockByHashMethod = QueryGrpc.getGetBlockByHashMethod) == null) {
synchronized (QueryGrpc.class) {
if ((getGetBlockByHashMethod = QueryGrpc.getGetBlockByHashMethod) == null) {
QueryGrpc.getGetBlockByHashMethod = getGetBlockByHashMethod =
io.grpc.MethodDescriptor.<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashRequest, org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashResponse>newBuilder()
io.grpc.MethodDescriptor.<org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest, org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBlockByHash"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashRequest.getDefaultInstance()))
org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashResponse.getDefaultInstance()))
org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse.getDefaultInstance()))
.setSchemaDescriptor(new QueryMethodDescriptorSupplier("GetBlockByHash"))
.build();
}
@ -58,29 +58,29 @@ public final class QueryGrpc {
return getGetBlockByHashMethod;
}
private static volatile io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest,
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlocksResponse> getGetBlocksMethod;
private static volatile io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse> getGetBlocksMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetBlocks",
requestType = org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest.class,
responseType = org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlocksResponse.class,
requestType = org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest.class,
responseType = org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest,
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlocksResponse> getGetBlocksMethod() {
io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest, org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlocksResponse> getGetBlocksMethod;
public static io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse> getGetBlocksMethod() {
io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest, org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse> getGetBlocksMethod;
if ((getGetBlocksMethod = QueryGrpc.getGetBlocksMethod) == null) {
synchronized (QueryGrpc.class) {
if ((getGetBlocksMethod = QueryGrpc.getGetBlocksMethod) == null) {
QueryGrpc.getGetBlocksMethod = getGetBlocksMethod =
io.grpc.MethodDescriptor.<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest, org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlocksResponse>newBuilder()
io.grpc.MethodDescriptor.<org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest, org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBlocks"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest.getDefaultInstance()))
org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlocksResponse.getDefaultInstance()))
org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse.getDefaultInstance()))
.setSchemaDescriptor(new QueryMethodDescriptorSupplier("GetBlocks"))
.build();
}
@ -89,29 +89,29 @@ public final class QueryGrpc {
return getGetBlocksMethod;
}
private static volatile io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest,
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountBlocksResponse> getCountBlocksMethod;
private static volatile io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse> getCountBlocksMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "CountBlocks",
requestType = org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest.class,
responseType = org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountBlocksResponse.class,
requestType = org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest.class,
responseType = org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest,
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountBlocksResponse> getCountBlocksMethod() {
io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest, org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountBlocksResponse> getCountBlocksMethod;
public static io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse> getCountBlocksMethod() {
io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest, org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse> getCountBlocksMethod;
if ((getCountBlocksMethod = QueryGrpc.getCountBlocksMethod) == null) {
synchronized (QueryGrpc.class) {
if ((getCountBlocksMethod = QueryGrpc.getCountBlocksMethod) == null) {
QueryGrpc.getCountBlocksMethod = getCountBlocksMethod =
io.grpc.MethodDescriptor.<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest, org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountBlocksResponse>newBuilder()
io.grpc.MethodDescriptor.<org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest, org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "CountBlocks"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest.getDefaultInstance()))
org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountBlocksResponse.getDefaultInstance()))
org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse.getDefaultInstance()))
.setSchemaDescriptor(new QueryMethodDescriptorSupplier("CountBlocks"))
.build();
}
@ -120,29 +120,60 @@ public final class QueryGrpc {
return getCountBlocksMethod;
}
private static volatile io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashRequest,
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashResponse> getGetTransactionByHashMethod;
private static volatile io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse> getGetRecentBlocksMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetRecentBlocks",
requestType = org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest.class,
responseType = org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse> getGetRecentBlocksMethod() {
io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest, org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse> getGetRecentBlocksMethod;
if ((getGetRecentBlocksMethod = QueryGrpc.getGetRecentBlocksMethod) == null) {
synchronized (QueryGrpc.class) {
if ((getGetRecentBlocksMethod = QueryGrpc.getGetRecentBlocksMethod) == null) {
QueryGrpc.getGetRecentBlocksMethod = getGetRecentBlocksMethod =
io.grpc.MethodDescriptor.<org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest, org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRecentBlocks"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse.getDefaultInstance()))
.setSchemaDescriptor(new QueryMethodDescriptorSupplier("GetRecentBlocks"))
.build();
}
}
}
return getGetRecentBlocksMethod;
}
private static volatile io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse> getGetTransactionByHashMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetTransactionByHash",
requestType = org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashRequest.class,
responseType = org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashResponse.class,
requestType = org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest.class,
responseType = org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashRequest,
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashResponse> getGetTransactionByHashMethod() {
io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashRequest, org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashResponse> getGetTransactionByHashMethod;
public static io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse> getGetTransactionByHashMethod() {
io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest, org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse> getGetTransactionByHashMethod;
if ((getGetTransactionByHashMethod = QueryGrpc.getGetTransactionByHashMethod) == null) {
synchronized (QueryGrpc.class) {
if ((getGetTransactionByHashMethod = QueryGrpc.getGetTransactionByHashMethod) == null) {
QueryGrpc.getGetTransactionByHashMethod = getGetTransactionByHashMethod =
io.grpc.MethodDescriptor.<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashRequest, org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashResponse>newBuilder()
io.grpc.MethodDescriptor.<org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest, org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTransactionByHash"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashRequest.getDefaultInstance()))
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashResponse.getDefaultInstance()))
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse.getDefaultInstance()))
.setSchemaDescriptor(new QueryMethodDescriptorSupplier("GetTransactionByHash"))
.build();
}
@ -151,29 +182,29 @@ public final class QueryGrpc {
return getGetTransactionByHashMethod;
}
private static volatile io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexRequest,
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexResponse> getGetTransactionByBlockHashAndIndexMethod;
private static volatile io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse> getGetTransactionByBlockHashAndIndexMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetTransactionByBlockHashAndIndex",
requestType = org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexRequest.class,
responseType = org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexResponse.class,
requestType = org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest.class,
responseType = org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexRequest,
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexResponse> getGetTransactionByBlockHashAndIndexMethod() {
io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexRequest, org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexResponse> getGetTransactionByBlockHashAndIndexMethod;
public static io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse> getGetTransactionByBlockHashAndIndexMethod() {
io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest, org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse> getGetTransactionByBlockHashAndIndexMethod;
if ((getGetTransactionByBlockHashAndIndexMethod = QueryGrpc.getGetTransactionByBlockHashAndIndexMethod) == null) {
synchronized (QueryGrpc.class) {
if ((getGetTransactionByBlockHashAndIndexMethod = QueryGrpc.getGetTransactionByBlockHashAndIndexMethod) == null) {
QueryGrpc.getGetTransactionByBlockHashAndIndexMethod = getGetTransactionByBlockHashAndIndexMethod =
io.grpc.MethodDescriptor.<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexRequest, org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexResponse>newBuilder()
io.grpc.MethodDescriptor.<org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest, org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTransactionByBlockHashAndIndex"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexRequest.getDefaultInstance()))
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexResponse.getDefaultInstance()))
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse.getDefaultInstance()))
.setSchemaDescriptor(new QueryMethodDescriptorSupplier("GetTransactionByBlockHashAndIndex"))
.build();
}
@ -182,29 +213,29 @@ public final class QueryGrpc {
return getGetTransactionByBlockHashAndIndexMethod;
}
private static volatile io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest,
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionsResponse> getGetTransactionsMethod;
private static volatile io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse> getGetTransactionsMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetTransactions",
requestType = org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest.class,
responseType = org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionsResponse.class,
requestType = org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest.class,
responseType = org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest,
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionsResponse> getGetTransactionsMethod() {
io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest, org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionsResponse> getGetTransactionsMethod;
public static io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse> getGetTransactionsMethod() {
io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest, org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse> getGetTransactionsMethod;
if ((getGetTransactionsMethod = QueryGrpc.getGetTransactionsMethod) == null) {
synchronized (QueryGrpc.class) {
if ((getGetTransactionsMethod = QueryGrpc.getGetTransactionsMethod) == null) {
QueryGrpc.getGetTransactionsMethod = getGetTransactionsMethod =
io.grpc.MethodDescriptor.<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest, org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionsResponse>newBuilder()
io.grpc.MethodDescriptor.<org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest, org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTransactions"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest.getDefaultInstance()))
org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionsResponse.getDefaultInstance()))
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse.getDefaultInstance()))
.setSchemaDescriptor(new QueryMethodDescriptorSupplier("GetTransactions"))
.build();
}
@ -213,29 +244,29 @@ public final class QueryGrpc {
return getGetTransactionsMethod;
}
private static volatile io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest,
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountTransactionsResponse> getCountTransactionsMethod;
private static volatile io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse> getCountTransactionsMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "CountTransactions",
requestType = org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest.class,
responseType = org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountTransactionsResponse.class,
requestType = org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest.class,
responseType = org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest,
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountTransactionsResponse> getCountTransactionsMethod() {
io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest, org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountTransactionsResponse> getCountTransactionsMethod;
public static io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse> getCountTransactionsMethod() {
io.grpc.MethodDescriptor<org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest, org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse> getCountTransactionsMethod;
if ((getCountTransactionsMethod = QueryGrpc.getCountTransactionsMethod) == null) {
synchronized (QueryGrpc.class) {
if ((getCountTransactionsMethod = QueryGrpc.getCountTransactionsMethod) == null) {
QueryGrpc.getCountTransactionsMethod = getCountTransactionsMethod =
io.grpc.MethodDescriptor.<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest, org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountTransactionsResponse>newBuilder()
io.grpc.MethodDescriptor.<org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest, org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "CountTransactions"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest.getDefaultInstance()))
org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountTransactionsResponse.getDefaultInstance()))
org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse.getDefaultInstance()))
.setSchemaDescriptor(new QueryMethodDescriptorSupplier("CountTransactions"))
.build();
}
@ -299,8 +330,8 @@ public final class QueryGrpc {
* 查询哈希所指定的区块
* </pre>
*/
public void getBlockByHash(org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashResponse> responseObserver) {
public void getBlockByHash(org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse> responseObserver) {
asyncUnimplementedUnaryCall(getGetBlockByHashMethod(), responseObserver);
}
@ -312,8 +343,8 @@ public final class QueryGrpc {
* start_timestamp is required
* </pre>
*/
public void getBlocks(org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlocksResponse> responseObserver) {
public void getBlocks(org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse> responseObserver) {
asyncUnimplementedUnaryCall(getGetBlocksMethod(), responseObserver);
}
@ -324,11 +355,23 @@ public final class QueryGrpc {
* 查询帐本中的所有区块数量或时间范围内的区块数量
* </pre>
*/
public void countBlocks(org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountBlocksResponse> responseObserver) {
public void countBlocks(org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse> responseObserver) {
asyncUnimplementedUnaryCall(getCountBlocksMethod(), responseObserver);
}
/**
* <pre>
**
* Get recent 'count' blocks (Only support IncludeTransactions=NONE for now)
* 查询最新的n个区块
* </pre>
*/
public void getRecentBlocks(org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse> responseObserver) {
asyncUnimplementedUnaryCall(getGetRecentBlocksMethod(), responseObserver);
}
/**
* <pre>
**
@ -336,8 +379,8 @@ public final class QueryGrpc {
* 查询哈希所指定的事务
* </pre>
*/
public void getTransactionByHash(org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashResponse> responseObserver) {
public void getTransactionByHash(org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse> responseObserver) {
asyncUnimplementedUnaryCall(getGetTransactionByHashMethod(), responseObserver);
}
@ -348,8 +391,8 @@ public final class QueryGrpc {
* 查询所在区块的哈希与其在区块中的index所指定的事务
* </pre>
*/
public void getTransactionByBlockHashAndIndex(org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexResponse> responseObserver) {
public void getTransactionByBlockHashAndIndex(org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse> responseObserver) {
asyncUnimplementedUnaryCall(getGetTransactionByBlockHashAndIndexMethod(), responseObserver);
}
@ -360,8 +403,8 @@ public final class QueryGrpc {
* 查询时间范围内的事务
* </pre>
*/
public void getTransactions(org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionsResponse> responseObserver) {
public void getTransactions(org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse> responseObserver) {
asyncUnimplementedUnaryCall(getGetTransactionsMethod(), responseObserver);
}
@ -373,8 +416,8 @@ public final class QueryGrpc {
* start_timestamp is required
* </pre>
*/
public void countTransactions(org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountTransactionsResponse> responseObserver) {
public void countTransactions(org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse> responseObserver) {
asyncUnimplementedUnaryCall(getCountTransactionsMethod(), responseObserver);
}
@ -384,50 +427,57 @@ public final class QueryGrpc {
getGetBlockByHashMethod(),
asyncUnaryCall(
new MethodHandlers<
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashRequest,
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashResponse>(
org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse>(
this, METHODID_GET_BLOCK_BY_HASH)))
.addMethod(
getGetBlocksMethod(),
asyncUnaryCall(
new MethodHandlers<
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest,
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlocksResponse>(
org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse>(
this, METHODID_GET_BLOCKS)))
.addMethod(
getCountBlocksMethod(),
asyncUnaryCall(
new MethodHandlers<
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest,
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountBlocksResponse>(
org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse>(
this, METHODID_COUNT_BLOCKS)))
.addMethod(
getGetRecentBlocksMethod(),
asyncUnaryCall(
new MethodHandlers<
org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse>(
this, METHODID_GET_RECENT_BLOCKS)))
.addMethod(
getGetTransactionByHashMethod(),
asyncUnaryCall(
new MethodHandlers<
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashRequest,
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashResponse>(
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse>(
this, METHODID_GET_TRANSACTION_BY_HASH)))
.addMethod(
getGetTransactionByBlockHashAndIndexMethod(),
asyncUnaryCall(
new MethodHandlers<
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexRequest,
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexResponse>(
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse>(
this, METHODID_GET_TRANSACTION_BY_BLOCK_HASH_AND_INDEX)))
.addMethod(
getGetTransactionsMethod(),
asyncUnaryCall(
new MethodHandlers<
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest,
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionsResponse>(
org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse>(
this, METHODID_GET_TRANSACTIONS)))
.addMethod(
getCountTransactionsMethod(),
asyncUnaryCall(
new MethodHandlers<
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest,
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountTransactionsResponse>(
org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest,
org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse>(
this, METHODID_COUNT_TRANSACTIONS)))
.build();
}
@ -454,8 +504,8 @@ public final class QueryGrpc {
* 查询哈希所指定的区块
* </pre>
*/
public void getBlockByHash(org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashResponse> responseObserver) {
public void getBlockByHash(org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetBlockByHashMethod(), getCallOptions()), request, responseObserver);
}
@ -468,8 +518,8 @@ public final class QueryGrpc {
* start_timestamp is required
* </pre>
*/
public void getBlocks(org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlocksResponse> responseObserver) {
public void getBlocks(org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetBlocksMethod(), getCallOptions()), request, responseObserver);
}
@ -481,12 +531,25 @@ public final class QueryGrpc {
* 查询帐本中的所有区块数量或时间范围内的区块数量
* </pre>
*/
public void countBlocks(org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountBlocksResponse> responseObserver) {
public void countBlocks(org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getCountBlocksMethod(), getCallOptions()), request, responseObserver);
}
/**
* <pre>
**
* Get recent 'count' blocks (Only support IncludeTransactions=NONE for now)
* 查询最新的n个区块
* </pre>
*/
public void getRecentBlocks(org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetRecentBlocksMethod(), getCallOptions()), request, responseObserver);
}
/**
* <pre>
**
@ -494,8 +557,8 @@ public final class QueryGrpc {
* 查询哈希所指定的事务
* </pre>
*/
public void getTransactionByHash(org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashResponse> responseObserver) {
public void getTransactionByHash(org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetTransactionByHashMethod(), getCallOptions()), request, responseObserver);
}
@ -507,8 +570,8 @@ public final class QueryGrpc {
* 查询所在区块的哈希与其在区块中的index所指定的事务
* </pre>
*/
public void getTransactionByBlockHashAndIndex(org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexResponse> responseObserver) {
public void getTransactionByBlockHashAndIndex(org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetTransactionByBlockHashAndIndexMethod(), getCallOptions()), request, responseObserver);
}
@ -520,8 +583,8 @@ public final class QueryGrpc {
* 查询时间范围内的事务
* </pre>
*/
public void getTransactions(org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionsResponse> responseObserver) {
public void getTransactions(org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetTransactionsMethod(), getCallOptions()), request, responseObserver);
}
@ -534,8 +597,8 @@ public final class QueryGrpc {
* start_timestamp is required
* </pre>
*/
public void countTransactions(org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountTransactionsResponse> responseObserver) {
public void countTransactions(org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest request,
io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getCountTransactionsMethod(), getCallOptions()), request, responseObserver);
}
@ -562,7 +625,7 @@ public final class QueryGrpc {
* 查询哈希所指定的区块
* </pre>
*/
public org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashResponse getBlockByHash(org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashRequest request) {
public org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse getBlockByHash(org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest request) {
return blockingUnaryCall(
getChannel(), getGetBlockByHashMethod(), getCallOptions(), request);
}
@ -575,7 +638,7 @@ public final class QueryGrpc {
* start_timestamp is required
* </pre>
*/
public org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlocksResponse getBlocks(org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest request) {
public org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse getBlocks(org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest request) {
return blockingUnaryCall(
getChannel(), getGetBlocksMethod(), getCallOptions(), request);
}
@ -587,11 +650,23 @@ public final class QueryGrpc {
* 查询帐本中的所有区块数量或时间范围内的区块数量
* </pre>
*/
public org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountBlocksResponse countBlocks(org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest request) {
public org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse countBlocks(org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest request) {
return blockingUnaryCall(
getChannel(), getCountBlocksMethod(), getCallOptions(), request);
}
/**
* <pre>
**
* Get recent 'count' blocks (Only support IncludeTransactions=NONE for now)
* 查询最新的n个区块
* </pre>
*/
public org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse getRecentBlocks(org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest request) {
return blockingUnaryCall(
getChannel(), getGetRecentBlocksMethod(), getCallOptions(), request);
}
/**
* <pre>
**
@ -599,7 +674,7 @@ public final class QueryGrpc {
* 查询哈希所指定的事务
* </pre>
*/
public org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashResponse getTransactionByHash(org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashRequest request) {
public org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse getTransactionByHash(org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest request) {
return blockingUnaryCall(
getChannel(), getGetTransactionByHashMethod(), getCallOptions(), request);
}
@ -611,7 +686,7 @@ public final class QueryGrpc {
* 查询所在区块的哈希与其在区块中的index所指定的事务
* </pre>
*/
public org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexResponse getTransactionByBlockHashAndIndex(org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexRequest request) {
public org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse getTransactionByBlockHashAndIndex(org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest request) {
return blockingUnaryCall(
getChannel(), getGetTransactionByBlockHashAndIndexMethod(), getCallOptions(), request);
}
@ -623,7 +698,7 @@ public final class QueryGrpc {
* 查询时间范围内的事务
* </pre>
*/
public org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionsResponse getTransactions(org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest request) {
public org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse getTransactions(org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest request) {
return blockingUnaryCall(
getChannel(), getGetTransactionsMethod(), getCallOptions(), request);
}
@ -636,7 +711,7 @@ public final class QueryGrpc {
* start_timestamp is required
* </pre>
*/
public org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountTransactionsResponse countTransactions(org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest request) {
public org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse countTransactions(org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest request) {
return blockingUnaryCall(
getChannel(), getCountTransactionsMethod(), getCallOptions(), request);
}
@ -663,8 +738,8 @@ public final class QueryGrpc {
* 查询哈希所指定的区块
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashResponse> getBlockByHash(
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashRequest request) {
public com.google.common.util.concurrent.ListenableFuture<org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse> getBlockByHash(
org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetBlockByHashMethod(), getCallOptions()), request);
}
@ -677,8 +752,8 @@ public final class QueryGrpc {
* start_timestamp is required
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlocksResponse> getBlocks(
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest request) {
public com.google.common.util.concurrent.ListenableFuture<org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse> getBlocks(
org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetBlocksMethod(), getCallOptions()), request);
}
@ -690,12 +765,25 @@ public final class QueryGrpc {
* 查询帐本中的所有区块数量或时间范围内的区块数量
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountBlocksResponse> countBlocks(
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest request) {
public com.google.common.util.concurrent.ListenableFuture<org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse> countBlocks(
org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest request) {
return futureUnaryCall(
getChannel().newCall(getCountBlocksMethod(), getCallOptions()), request);
}
/**
* <pre>
**
* Get recent 'count' blocks (Only support IncludeTransactions=NONE for now)
* 查询最新的n个区块
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse> getRecentBlocks(
org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetRecentBlocksMethod(), getCallOptions()), request);
}
/**
* <pre>
**
@ -703,8 +791,8 @@ public final class QueryGrpc {
* 查询哈希所指定的事务
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashResponse> getTransactionByHash(
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashRequest request) {
public com.google.common.util.concurrent.ListenableFuture<org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse> getTransactionByHash(
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetTransactionByHashMethod(), getCallOptions()), request);
}
@ -716,8 +804,8 @@ public final class QueryGrpc {
* 查询所在区块的哈希与其在区块中的index所指定的事务
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexResponse> getTransactionByBlockHashAndIndex(
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexRequest request) {
public com.google.common.util.concurrent.ListenableFuture<org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse> getTransactionByBlockHashAndIndex(
org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetTransactionByBlockHashAndIndexMethod(), getCallOptions()), request);
}
@ -729,8 +817,8 @@ public final class QueryGrpc {
* 查询时间范围内的事务
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionsResponse> getTransactions(
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest request) {
public com.google.common.util.concurrent.ListenableFuture<org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse> getTransactions(
org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetTransactionsMethod(), getCallOptions()), request);
}
@ -743,8 +831,8 @@ public final class QueryGrpc {
* start_timestamp is required
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountTransactionsResponse> countTransactions(
org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest request) {
public com.google.common.util.concurrent.ListenableFuture<org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse> countTransactions(
org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest request) {
return futureUnaryCall(
getChannel().newCall(getCountTransactionsMethod(), getCallOptions()), request);
}
@ -753,10 +841,11 @@ public final class QueryGrpc {
private static final int METHODID_GET_BLOCK_BY_HASH = 0;
private static final int METHODID_GET_BLOCKS = 1;
private static final int METHODID_COUNT_BLOCKS = 2;
private static final int METHODID_GET_TRANSACTION_BY_HASH = 3;
private static final int METHODID_GET_TRANSACTION_BY_BLOCK_HASH_AND_INDEX = 4;
private static final int METHODID_GET_TRANSACTIONS = 5;
private static final int METHODID_COUNT_TRANSACTIONS = 6;
private static final int METHODID_GET_RECENT_BLOCKS = 3;
private static final int METHODID_GET_TRANSACTION_BY_HASH = 4;
private static final int METHODID_GET_TRANSACTION_BY_BLOCK_HASH_AND_INDEX = 5;
private static final int METHODID_GET_TRANSACTIONS = 6;
private static final int METHODID_COUNT_TRANSACTIONS = 7;
private static final class MethodHandlers<Req, Resp> implements
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
@ -776,32 +865,36 @@ public final class QueryGrpc {
public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
switch (methodId) {
case METHODID_GET_BLOCK_BY_HASH:
serviceImpl.getBlockByHash((org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashRequest) request,
(io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlockByHashResponse>) responseObserver);
serviceImpl.getBlockByHash((org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashRequest) request,
(io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlockByHashResponse>) responseObserver);
break;
case METHODID_GET_BLOCKS:
serviceImpl.getBlocks((org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest) request,
(io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetBlocksResponse>) responseObserver);
serviceImpl.getBlocks((org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest) request,
(io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse>) responseObserver);
break;
case METHODID_COUNT_BLOCKS:
serviceImpl.countBlocks((org.bdware.bdledger.api.grpc.pb.QueryOuterClass.BlocksRequest) request,
(io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountBlocksResponse>) responseObserver);
serviceImpl.countBlocks((org.bdware.bdledger.api.grpc.pb.QueryProto.BlocksRequest) request,
(io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.CountBlocksResponse>) responseObserver);
break;
case METHODID_GET_RECENT_BLOCKS:
serviceImpl.getRecentBlocks((org.bdware.bdledger.api.grpc.pb.QueryProto.RecentBlocksRequest) request,
(io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.GetBlocksResponse>) responseObserver);
break;
case METHODID_GET_TRANSACTION_BY_HASH:
serviceImpl.getTransactionByHash((org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashRequest) request,
(io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByHashResponse>) responseObserver);
serviceImpl.getTransactionByHash((org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashRequest) request,
(io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByHashResponse>) responseObserver);
break;
case METHODID_GET_TRANSACTION_BY_BLOCK_HASH_AND_INDEX:
serviceImpl.getTransactionByBlockHashAndIndex((org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexRequest) request,
(io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionByBlockHashAndIndexResponse>) responseObserver);
serviceImpl.getTransactionByBlockHashAndIndex((org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexRequest) request,
(io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionByBlockHashAndIndexResponse>) responseObserver);
break;
case METHODID_GET_TRANSACTIONS:
serviceImpl.getTransactions((org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest) request,
(io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.GetTransactionsResponse>) responseObserver);
serviceImpl.getTransactions((org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest) request,
(io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.GetTransactionsResponse>) responseObserver);
break;
case METHODID_COUNT_TRANSACTIONS:
serviceImpl.countTransactions((org.bdware.bdledger.api.grpc.pb.QueryOuterClass.TransactionsRequest) request,
(io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryOuterClass.CountTransactionsResponse>) responseObserver);
serviceImpl.countTransactions((org.bdware.bdledger.api.grpc.pb.QueryProto.TransactionsRequest) request,
(io.grpc.stub.StreamObserver<org.bdware.bdledger.api.grpc.pb.QueryProto.CountTransactionsResponse>) responseObserver);
break;
default:
throw new AssertionError();
@ -825,7 +918,7 @@ public final class QueryGrpc {
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return org.bdware.bdledger.api.grpc.pb.QueryOuterClass.getDescriptor();
return org.bdware.bdledger.api.grpc.pb.QueryProto.getDescriptor();
}
@java.lang.Override
@ -867,6 +960,7 @@ public final class QueryGrpc {
.addMethod(getGetBlockByHashMethod())
.addMethod(getGetBlocksMethod())
.addMethod(getCountBlocksMethod())
.addMethod(getGetRecentBlocksMethod())
.addMethod(getGetTransactionByHashMethod())
.addMethod(getGetTransactionByBlockHashAndIndexMethod())
.addMethod(getGetTransactionsMethod())

View File

@ -1,17 +1,12 @@
package org.bdware.bdledger.api.grpc;
import org.bdware.bdledger.api.grpc.pb.Common.Block;
import org.bdware.bdledger.api.grpc.pb.Common.Transaction;
import org.bdware.bdledger.api.grpc.pb.Common.TransactionType;
import org.bdware.bdledger.api.grpc.pb.LedgerOuterClass.GetLedgersResponse;
import com.google.protobuf.ByteString;
import io.grpc.Status;
import org.bdware.bdledger.api.grpc.pb.QueryOuterClass;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.bdware.bdledger.api.grpc.pb.CommonProto.Block;
import org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction;
import org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType;
import org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse;
import org.junit.jupiter.api.*;
import java.util.Arrays;
import java.util.List;
@ -19,7 +14,7 @@ import java.util.concurrent.ExecutionException;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import static org.junit.jupiter.api.Assertions.*;
import static org.junit.jupiter.api.Assertions.assertEquals;
@DisplayName("Transaction Ledger tests")
class ClientTests {
@ -99,175 +94,175 @@ class ClientTests {
private static Client client;
@BeforeAll
static void initAll() {
client = new Client("localhost", 10000);
}
@Test
@DisplayName("ClientVersion#1")
void clientVersion1() throws ExecutionException, InterruptedException {
Assertions.assertEquals(
"TxLedgerGo/v0.0.1alpha/darwin/go1.11", client.clientVersion().get().getVersion());
}
@Test
@DisplayName("CreateLedger#1")
void createLedger1() throws ExecutionException, InterruptedException {
Assertions.assertTrue(client.createLedger(ledger).get().getOk());
}
@Test
@DisplayName("CreateLedger#2")
void createLedger2() {
Throwable e = Assertions.assertThrows(Exception.class, () -> client.createLedger("").get());
Status s = Status.fromThrowable(e);
Assertions.assertEquals(Status.Code.INVALID_ARGUMENT, s.getCode());
Assertions.assertEquals("name must not be empty", s.getDescription());
}
@Test
@DisplayName("GetLedgers#1")
void getLedgers1() throws ExecutionException, InterruptedException {
GetLedgersResponse r = client.getLedgers().get();
assertEquals(3, r.getLedgersCount());
String[] expected = new String[]{"first", "second", "third"};
Assertions.assertAll(
IntStream.range(0, 3).boxed().map(i -> () -> assertEquals(expected[i], r.getLedgers(i))));
}
@Test
@DisplayName("SendTransaction#1")
void sendTransaction1() throws ExecutionException, InterruptedException {
String hash =
Utils.byteArrayToHexString(
client
.sendTransaction(
ledger,
TransactionType.MESSAGE,
"f00dcafef00dcafef00dcafef00dcafef00dcafe",
"feedbabefeedbabefeedbabefeedbabefeedbabe",
Utils.hexStringToByteArray("deadbeef"))
.get()
.getHash()
.toByteArray());
Assertions.assertEquals("d15ea5edd15ea5edd15ea5edd15ea5edd15ea5ed", hash);
}
@Test
@DisplayName("SendTransaction#2")
void sendTransaction2() {
Throwable e =
Assertions.assertThrows(
Exception.class,
() ->
client
.sendTransaction(ledger, TransactionType.MESSAGE, null, "50bada55", null)
.get());
Status s = Status.fromThrowable(e);
Assertions.assertEquals(Status.Code.INVALID_ARGUMENT, s.getCode());
Assertions.assertEquals("Multiple invalid arguments", s.getDescription());
}
@Test
@DisplayName("GetBlockByHash#1")
void getBlockByHash1() throws ExecutionException, InterruptedException {
Block b = client.getBlockByHash(ledger, blockHashStr, false).get().getBlock();
assertEquals(block, b);
}
// TODO
@Test
@DisplayName("getBlocks#1")
void getBlocks1() throws ExecutionException, InterruptedException {
client.getBlocks(ledger, 0, null).get();
}
// TODO
@Test
@DisplayName("getBlocks#2")
void getBlocks2() throws ExecutionException, InterruptedException {
client.getBlocks(ledger, 0, 0, null).get();
}
@Test
@DisplayName("getBlocks#3")
void getBlocks3() {
Throwable e = Assertions.assertThrows(Exception.class, () -> client.getBlocks("", 0, 0, null).get());
Status s = Status.fromThrowable(e);
Assertions.assertEquals(Status.Code.INVALID_ARGUMENT, s.getCode());
Assertions.assertEquals("ledger must not be empty", s.getDescription());
}
@Test
@DisplayName("CountBlocks#1")
void blockNumber1() throws ExecutionException, InterruptedException {
Assertions.assertEquals(blockCount, client.countBlocks(ledger).get().getCount());
}
@Test
@DisplayName("CountBlocks#2")
void blockNumber2() {
Throwable e = Assertions.assertThrows(Exception.class, () -> client.countBlocks("").get());
Status s = Status.fromThrowable(e);
Assertions.assertEquals(Status.Code.INVALID_ARGUMENT, s.getCode());
Assertions.assertEquals("ledger must not be empty", s.getDescription());
}
@Test
@DisplayName("GetTransactionByHash#1")
void getTransactionByHash1() throws ExecutionException, InterruptedException {
Transaction t = client.getTransactionByHash(ledger, txHashStr).get().getTransaction();
assertEquals(tx, t);
}
@Test
@DisplayName("GetTransactionByBlockHashAndIndex#1")
void GetTransactionByBlockHashAndIndex1() throws ExecutionException, InterruptedException {
Transaction t = client.getTransactionByBlockHashAndIndex(ledger, blockHashStr, index).get().getTransaction();
assertEquals(tx, t);
}
// TODO
@Test
@DisplayName("getTransactions#1")
void getTransactions1() throws ExecutionException, InterruptedException {
client.getTransactions(ledger, 0).get();
}
// TODO
@Test
@DisplayName("getTransactions#2")
void getTransactions2() throws ExecutionException, InterruptedException {
client.getTransactions(ledger, 0, 0).get();
}
@Test
@DisplayName("getTransactions#3")
void getTransactions3() {
Throwable e = Assertions.assertThrows(Exception.class, () -> client.getTransactions("", 0, 0).get());
Status s = Status.fromThrowable(e);
Assertions.assertEquals(Status.Code.INVALID_ARGUMENT, s.getCode());
Assertions.assertEquals("ledger must not be empty", s.getDescription());
}
@Test
@DisplayName("CountTransactions#1")
void CountTransactions1() throws ExecutionException, InterruptedException {
Assertions.assertEquals(transactionCount, client.countTransactions(ledger).get().getCount());
}
@Test
@DisplayName("CountTransactions#2")
void CountTransactions2() {
Throwable e = Assertions.assertThrows(Exception.class, () -> client.countTransactions("").get());
Status s = Status.fromThrowable(e);
Assertions.assertEquals(Status.Code.INVALID_ARGUMENT, s.getCode());
Assertions.assertEquals("ledger must not be empty", s.getDescription());
}
@AfterAll
static void teadDwonAll() throws InterruptedException {
client.shutdown();
}
// @BeforeAll
// static void initAll() {
// client = new Client("localhost", 10000);
// }
//
// @Test
// @DisplayName("ClientVersion#1")
// void clientVersion1() throws ExecutionException, InterruptedException {
// Assertions.assertEquals(
// "TxLedgerGo/v0.0.1alpha/darwin/go1.11", client.clientVersion().get().getVersion());
// }
//
// @Test
// @DisplayName("CreateLedger#1")
// void createLedger1() throws ExecutionException, InterruptedException {
// Assertions.assertTrue(client.createLedger(ledger).get().getOk());
// }
//
// @Test
// @DisplayName("CreateLedger#2")
// void createLedger2() {
// Throwable e = Assertions.assertThrows(Exception.class, () -> client.createLedger("").get());
// Status s = Status.fromThrowable(e);
// Assertions.assertEquals(Status.Code.INVALID_ARGUMENT, s.getCode());
// Assertions.assertEquals("name must not be empty", s.getDescription());
// }
//
// @Test
// @DisplayName("GetLedgers#1")
// void getLedgers1() throws ExecutionException, InterruptedException {
// GetLedgersResponse r = client.getLedgers().get();
// assertEquals(3, r.getLedgersCount());
// String[] expected = new String[]{"first", "second", "third"};
// Assertions.assertAll(
// IntStream.range(0, 3).boxed().map(i -> () -> assertEquals(expected[i], r.getLedgers(i))));
// }
//
// @Test
// @DisplayName("SendTransaction#1")
// void sendTransaction1() throws ExecutionException, InterruptedException {
// String hash =
// Utils.byteArrayToHexString(
// client
// .sendTransaction(
// ledger,
// TransactionType.MESSAGE,
// "f00dcafef00dcafef00dcafef00dcafef00dcafe",
// "feedbabefeedbabefeedbabefeedbabefeedbabe",
// Utils.hexStringToByteArray("deadbeef"))
// .get()
// .getHash()
// .toByteArray());
// Assertions.assertEquals("d15ea5edd15ea5edd15ea5edd15ea5edd15ea5ed", hash);
// }
//
// @Test
// @DisplayName("SendTransaction#2")
// void sendTransaction2() {
// Throwable e =
// Assertions.assertThrows(
// Exception.class,
// () ->
// client
// .sendTransaction(ledger, TransactionType.MESSAGE, null, "50bada55", null)
// .get());
// Status s = Status.fromThrowable(e);
// Assertions.assertEquals(Status.Code.INVALID_ARGUMENT, s.getCode());
// Assertions.assertEquals("Multiple invalid arguments", s.getDescription());
// }
//
// @Test
// @DisplayName("GetBlockByHash#1")
// void getBlockByHash1() throws ExecutionException, InterruptedException {
// Block b = client.getBlockByHash(ledger, blockHashStr, false).get().getBlock();
// assertEquals(block, b);
// }
//
// // TODO
// @Test
// @DisplayName("getBlocks#1")
// void getBlocks1() throws ExecutionException, InterruptedException {
// client.getBlocks(ledger, 0, null).get();
// }
//
// // TODO
// @Test
// @DisplayName("getBlocks#2")
// void getBlocks2() throws ExecutionException, InterruptedException {
// client.getBlocks(ledger, 0, 0, null).get();
// }
//
// @Test
// @DisplayName("getBlocks#3")
// void getBlocks3() {
// Throwable e = Assertions.assertThrows(Exception.class, () -> client.getBlocks("", 0, 0, null).get());
// Status s = Status.fromThrowable(e);
// Assertions.assertEquals(Status.Code.INVALID_ARGUMENT, s.getCode());
// Assertions.assertEquals("ledger must not be empty", s.getDescription());
// }
//
// @Test
// @DisplayName("CountBlocks#1")
// void blockNumber1() throws ExecutionException, InterruptedException {
// Assertions.assertEquals(blockCount, client.countBlocks(ledger).get().getCount());
// }
//
// @Test
// @DisplayName("CountBlocks#2")
// void blockNumber2() {
// Throwable e = Assertions.assertThrows(Exception.class, () -> client.countBlocks("").get());
// Status s = Status.fromThrowable(e);
// Assertions.assertEquals(Status.Code.INVALID_ARGUMENT, s.getCode());
// Assertions.assertEquals("ledger must not be empty", s.getDescription());
// }
//
// @Test
// @DisplayName("GetTransactionByHash#1")
// void getTransactionByHash1() throws ExecutionException, InterruptedException {
// Transaction t = client.getTransactionByHash(ledger, txHashStr).get().getTransaction();
// assertEquals(tx, t);
// }
//
// @Test
// @DisplayName("GetTransactionByBlockHashAndIndex#1")
// void GetTransactionByBlockHashAndIndex1() throws ExecutionException, InterruptedException {
// Transaction t = client.getTransactionByBlockHashAndIndex(ledger, blockHashStr, index).get().getTransaction();
// assertEquals(tx, t);
// }
//
// // TODO
// @Test
// @DisplayName("getTransactions#1")
// void getTransactions1() throws ExecutionException, InterruptedException {
// client.getTransactions(ledger, 0).get();
// }
//
// // TODO
// @Test
// @DisplayName("getTransactions#2")
// void getTransactions2() throws ExecutionException, InterruptedException {
// client.getTransactions(ledger, 0, 0).get();
// }
//
// @Test
// @DisplayName("getTransactions#3")
// void getTransactions3() {
// Throwable e = Assertions.assertThrows(Exception.class, () -> client.getTransactions("", 0, 0).get());
// Status s = Status.fromThrowable(e);
// Assertions.assertEquals(Status.Code.INVALID_ARGUMENT, s.getCode());
// Assertions.assertEquals("ledger must not be empty", s.getDescription());
// }
//
// @Test
// @DisplayName("CountTransactions#1")
// void CountTransactions1() throws ExecutionException, InterruptedException {
// Assertions.assertEquals(transactionCount, client.countTransactions(ledger).get().getCount());
// }
//
// @Test
// @DisplayName("CountTransactions#2")
// void CountTransactions2() {
// Throwable e = Assertions.assertThrows(Exception.class, () -> client.countTransactions("").get());
// Status s = Status.fromThrowable(e);
// Assertions.assertEquals(Status.Code.INVALID_ARGUMENT, s.getCode());
// Assertions.assertEquals("ledger must not be empty", s.getDescription());
// }
//
// @AfterAll
// static void teadDwonAll() throws InterruptedException {
// client.shutdown();
// }
}