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; 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.common.util.concurrent.ListenableFuture;
import com.google.protobuf.ByteString; import com.google.protobuf.ByteString;
import com.google.protobuf.Empty; import com.google.protobuf.Empty;
import io.grpc.ManagedChannel; import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder; import io.grpc.ManagedChannelBuilder;
import io.grpc.Metadata;
import io.grpc.StatusRuntimeException; 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.time.ZonedDateTime;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
@ -258,7 +259,7 @@ public class Client {
* href="#">返回哈希所指定的区块</a> * href="#">返回哈希所指定的区块</a>
* 非阻塞 * 非阻塞
*/ */
public ListenableFuture<QueryOuterClass.GetBlockByHashResponse> getBlockByHash( public ListenableFuture<GetBlockByHashResponse> getBlockByHash(
String ledger, String hash, boolean fullTransactions) { String ledger, String hash, boolean fullTransactions) {
info( 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.Builder reqBuilder =
BlocksRequest.newBuilder().setLedger(ledger); BlocksRequest.newBuilder().setLedger(ledger);
@ -441,7 +442,7 @@ public class Client {
reqBuilder.setEndTimestamp(endTimestamp); reqBuilder.setEndTimestamp(endTimestamp);
} }
if (includeTransactions == null) { if (includeTransactions == null) {
includeTransactions = BlocksRequest.IncludeTransactions.NONE; includeTransactions = IncludeTransactions.NONE;
} }
reqBuilder.setIncludeTransactions(includeTransactions); reqBuilder.setIncludeTransactions(includeTransactions);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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