Package org.bdware.bdledger.api.grpc.pb
Class CommonProto.Block
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
org.bdware.bdledger.api.grpc.pb.CommonProto.Block
- All Implemented Interfaces:
com.google.protobuf.Message
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Serializable
,CommonProto.BlockOrBuilder
- Enclosing class:
CommonProto
public static final class CommonProto.Block
extends com.google.protobuf.GeneratedMessageV3
implements CommonProto.BlockOrBuilder
Protobuf type
bdware.bdledger.api.Block
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Protobuf typebdware.bdledger.api.Block
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,
BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from class com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFields
Fields inherited from class com.google.protobuf.AbstractMessage
memoizedSize
Fields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode
-
Method Summary
Modifier and TypeMethodDescriptionboolean
com.google.protobuf.ByteString
产块者账户地址com.google.protobuf.ByteString
产块者签名static CommonProto.Block
static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.ByteString
getHash()
区块的哈希,当区块处于待确认状态时为`null`long
getNonce()
这个区块之前产块者产生的区块数量com.google.protobuf.ByteString
getParentHashes
(int index) 父区块的哈希int
父区块的哈希List<com.google.protobuf.ByteString>
父区块的哈希com.google.protobuf.Parser<CommonProto.Block>
int
long
getSize()
区块大小的字节数long
区块产生时的 UNIX 时间戳,单位为秒int
区块包含的事务数量com.google.protobuf.ByteString
getTransactionHashes
(int index) 20字节的事务哈希的数组,或为空int
20字节的事务哈希的数组,或为空List<com.google.protobuf.ByteString>
20字节的事务哈希的数组,或为空getTransactions
(int index) 事务对象的数组,或为空int
事务对象的数组,或为空事务对象的数组,或为空getTransactionsOrBuilder
(int index) 事务对象的数组,或为空List<? extends CommonProto.TransactionOrBuilder>
事务对象的数组,或为空com.google.protobuf.ByteString
区块的事务默克尔树根final com.google.protobuf.UnknownFieldSet
com.google.protobuf.ByteString
getWitnesses
(int index) 见证者账户地址int
见证者账户地址List<com.google.protobuf.ByteString>
见证者账户地址com.google.protobuf.ByteString
getWitnessSignatures
(int index) 见证者签名int
见证者签名List<com.google.protobuf.ByteString>
见证者签名int
hashCode()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
final boolean
static CommonProto.Block.Builder
static CommonProto.Block.Builder
newBuilder
(CommonProto.Block prototype) protected CommonProto.Block.Builder
newBuilderForType
(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected Object
newInstance
(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static CommonProto.Block
parseDelimitedFrom
(InputStream input) static CommonProto.Block
parseDelimitedFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CommonProto.Block
parseFrom
(byte[] data) static CommonProto.Block
parseFrom
(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CommonProto.Block
parseFrom
(com.google.protobuf.ByteString data) static CommonProto.Block
parseFrom
(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CommonProto.Block
parseFrom
(com.google.protobuf.CodedInputStream input) static CommonProto.Block
parseFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CommonProto.Block
parseFrom
(InputStream input) static CommonProto.Block
parseFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CommonProto.Block
parseFrom
(ByteBuffer data) static CommonProto.Block
parseFrom
(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<CommonProto.Block>
parser()
void
writeTo
(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeTo
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
-
Field Details
-
HASH_FIELD_NUMBER
public static final int HASH_FIELD_NUMBER- See Also:
-
CREATOR_FIELD_NUMBER
public static final int CREATOR_FIELD_NUMBER- See Also:
-
NONCE_FIELD_NUMBER
public static final int NONCE_FIELD_NUMBER- See Also:
-
PARENT_HASHES_FIELD_NUMBER
public static final int PARENT_HASHES_FIELD_NUMBER- See Also:
-
WITNESSES_FIELD_NUMBER
public static final int WITNESSES_FIELD_NUMBER- See Also:
-
TIMESTAMP_FIELD_NUMBER
public static final int TIMESTAMP_FIELD_NUMBER- See Also:
-
SIZE_FIELD_NUMBER
public static final int SIZE_FIELD_NUMBER- See Also:
-
TRANSACTION_COUNT_FIELD_NUMBER
public static final int TRANSACTION_COUNT_FIELD_NUMBER- See Also:
-
TRANSACTIONS_ROOT_FIELD_NUMBER
public static final int TRANSACTIONS_ROOT_FIELD_NUMBER- See Also:
-
TRANSACTIONS_FIELD_NUMBER
public static final int TRANSACTIONS_FIELD_NUMBER- See Also:
-
TRANSACTION_HASHES_FIELD_NUMBER
public static final int TRANSACTION_HASHES_FIELD_NUMBER- See Also:
-
CREATOR_SIGNATURE_FIELD_NUMBER
public static final int CREATOR_SIGNATURE_FIELD_NUMBER- See Also:
-
WITNESS_SIGNATURES_FIELD_NUMBER
public static final int WITNESS_SIGNATURES_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()- Specified by:
getUnknownFields
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getUnknownFields
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3
-
getHash
public com.google.protobuf.ByteString getHash()区块的哈希,当区块处于待确认状态时为`null`
bytes hash = 1;
- Specified by:
getHash
in interfaceCommonProto.BlockOrBuilder
- Returns:
- The hash.
-
getCreator
public com.google.protobuf.ByteString getCreator()产块者账户地址
bytes creator = 2;
- Specified by:
getCreator
in interfaceCommonProto.BlockOrBuilder
- Returns:
- The creator.
-
getNonce
public long getNonce()这个区块之前产块者产生的区块数量
uint64 nonce = 3;
- Specified by:
getNonce
in interfaceCommonProto.BlockOrBuilder
- Returns:
- The nonce.
-
getParentHashesList
父区块的哈希
repeated bytes parent_hashes = 4;
- Specified by:
getParentHashesList
in interfaceCommonProto.BlockOrBuilder
- Returns:
- A list containing the parentHashes.
-
getParentHashesCount
public int getParentHashesCount()父区块的哈希
repeated bytes parent_hashes = 4;
- Specified by:
getParentHashesCount
in interfaceCommonProto.BlockOrBuilder
- Returns:
- The count of parentHashes.
-
getParentHashes
public com.google.protobuf.ByteString getParentHashes(int index) 父区块的哈希
repeated bytes parent_hashes = 4;
- Specified by:
getParentHashes
in interfaceCommonProto.BlockOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The parentHashes at the given index.
-
getWitnessesList
见证者账户地址
repeated bytes witnesses = 5;
- Specified by:
getWitnessesList
in interfaceCommonProto.BlockOrBuilder
- Returns:
- A list containing the witnesses.
-
getWitnessesCount
public int getWitnessesCount()见证者账户地址
repeated bytes witnesses = 5;
- Specified by:
getWitnessesCount
in interfaceCommonProto.BlockOrBuilder
- Returns:
- The count of witnesses.
-
getWitnesses
public com.google.protobuf.ByteString getWitnesses(int index) 见证者账户地址
repeated bytes witnesses = 5;
- Specified by:
getWitnesses
in interfaceCommonProto.BlockOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The witnesses at the given index.
-
getTimestamp
public long getTimestamp()区块产生时的 UNIX 时间戳,单位为秒
int64 timestamp = 6;
- Specified by:
getTimestamp
in interfaceCommonProto.BlockOrBuilder
- Returns:
- The timestamp.
-
getSize
public long getSize()区块大小的字节数
uint64 size = 7;
- Specified by:
getSize
in interfaceCommonProto.BlockOrBuilder
- Returns:
- The size.
-
getTransactionCount
public int getTransactionCount()区块包含的事务数量
uint32 transaction_count = 8;
- Specified by:
getTransactionCount
in interfaceCommonProto.BlockOrBuilder
- Returns:
- The transactionCount.
-
getTransactionsRoot
public com.google.protobuf.ByteString getTransactionsRoot()区块的事务默克尔树根
bytes transactions_root = 9;
- Specified by:
getTransactionsRoot
in interfaceCommonProto.BlockOrBuilder
- Returns:
- The transactionsRoot.
-
getTransactionsList
事务对象的数组,或为空
repeated .bdware.bdledger.api.Transaction transactions = 10;
- Specified by:
getTransactionsList
in interfaceCommonProto.BlockOrBuilder
-
getTransactionsOrBuilderList
事务对象的数组,或为空
repeated .bdware.bdledger.api.Transaction transactions = 10;
- Specified by:
getTransactionsOrBuilderList
in interfaceCommonProto.BlockOrBuilder
-
getTransactionsCount
public int getTransactionsCount()事务对象的数组,或为空
repeated .bdware.bdledger.api.Transaction transactions = 10;
- Specified by:
getTransactionsCount
in interfaceCommonProto.BlockOrBuilder
-
getTransactions
事务对象的数组,或为空
repeated .bdware.bdledger.api.Transaction transactions = 10;
- Specified by:
getTransactions
in interfaceCommonProto.BlockOrBuilder
-
getTransactionsOrBuilder
事务对象的数组,或为空
repeated .bdware.bdledger.api.Transaction transactions = 10;
- Specified by:
getTransactionsOrBuilder
in interfaceCommonProto.BlockOrBuilder
-
getTransactionHashesList
20字节的事务哈希的数组,或为空
repeated bytes transaction_hashes = 11;
- Specified by:
getTransactionHashesList
in interfaceCommonProto.BlockOrBuilder
- Returns:
- A list containing the transactionHashes.
-
getTransactionHashesCount
public int getTransactionHashesCount()20字节的事务哈希的数组,或为空
repeated bytes transaction_hashes = 11;
- Specified by:
getTransactionHashesCount
in interfaceCommonProto.BlockOrBuilder
- Returns:
- The count of transactionHashes.
-
getTransactionHashes
public com.google.protobuf.ByteString getTransactionHashes(int index) 20字节的事务哈希的数组,或为空
repeated bytes transaction_hashes = 11;
- Specified by:
getTransactionHashes
in interfaceCommonProto.BlockOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The transactionHashes at the given index.
-
getCreatorSignature
public com.google.protobuf.ByteString getCreatorSignature()产块者签名
bytes creator_signature = 12;
- Specified by:
getCreatorSignature
in interfaceCommonProto.BlockOrBuilder
- Returns:
- The creatorSignature.
-
getWitnessSignaturesList
见证者签名
repeated bytes witness_signatures = 13;
- Specified by:
getWitnessSignaturesList
in interfaceCommonProto.BlockOrBuilder
- Returns:
- A list containing the witnessSignatures.
-
getWitnessSignaturesCount
public int getWitnessSignaturesCount()见证者签名
repeated bytes witness_signatures = 13;
- Specified by:
getWitnessSignaturesCount
in interfaceCommonProto.BlockOrBuilder
- Returns:
- The count of witnessSignatures.
-
getWitnessSignatures
public com.google.protobuf.ByteString getWitnessSignatures(int index) 见证者签名
repeated bytes witness_signatures = 13;
- Specified by:
getWitnessSignatures
in interfaceCommonProto.BlockOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The witnessSignatures at the given index.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.google.protobuf.AbstractMessage
-
parseFrom
public static CommonProto.Block parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CommonProto.Block parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CommonProto.Block parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CommonProto.Block parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CommonProto.Block parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CommonProto.Block parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static CommonProto.Block parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static CommonProto.Block parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static CommonProto.Block parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static CommonProto.Block parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected CommonProto.Block.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-