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
Nested ClassesModifier and TypeClassDescriptionstatic final classProtobuf typebdware.bdledger.api.BlockNested 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
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleancom.google.protobuf.ByteString产块者账户地址com.google.protobuf.ByteString产块者签名static CommonProto.Blockstatic final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.ByteStringgetHash()区块的哈希,当区块处于待确认状态时为`null`longgetNonce()这个区块之前产块者产生的区块数量com.google.protobuf.ByteStringgetParentHashes(int index) 父区块的哈希int父区块的哈希List<com.google.protobuf.ByteString>父区块的哈希com.google.protobuf.Parser<CommonProto.Block>intlonggetSize()区块大小的字节数long区块产生时的 UNIX 时间戳,单位为秒int区块包含的事务数量com.google.protobuf.ByteStringgetTransactionHashes(int index) 20字节的事务哈希的数组,或为空int20字节的事务哈希的数组,或为空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.UnknownFieldSetcom.google.protobuf.ByteStringgetWitnesses(int index) 见证者账户地址int见证者账户地址List<com.google.protobuf.ByteString>见证者账户地址com.google.protobuf.ByteStringgetWitnessSignatures(int index) 见证者签名int见证者签名List<com.google.protobuf.ByteString>见证者签名inthashCode()protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanstatic CommonProto.Block.Builderstatic CommonProto.Block.BuildernewBuilder(CommonProto.Block prototype) protected CommonProto.Block.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static CommonProto.BlockparseDelimitedFrom(InputStream input) static CommonProto.BlockparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CommonProto.BlockparseFrom(byte[] data) static CommonProto.BlockparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CommonProto.BlockparseFrom(com.google.protobuf.ByteString data) static CommonProto.BlockparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CommonProto.BlockparseFrom(com.google.protobuf.CodedInputStream input) static CommonProto.BlockparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CommonProto.BlockparseFrom(InputStream input) static CommonProto.BlockparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CommonProto.BlockparseFrom(ByteBuffer data) static CommonProto.BlockparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<CommonProto.Block>parser()voidwriteTo(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, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods 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:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()- Specified by:
getUnknownFieldsin interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getHash
public com.google.protobuf.ByteString getHash()区块的哈希,当区块处于待确认状态时为`null`
bytes hash = 1;- Specified by:
getHashin interfaceCommonProto.BlockOrBuilder- Returns:
- The hash.
-
getCreator
public com.google.protobuf.ByteString getCreator()产块者账户地址
bytes creator = 2;- Specified by:
getCreatorin interfaceCommonProto.BlockOrBuilder- Returns:
- The creator.
-
getNonce
public long getNonce()这个区块之前产块者产生的区块数量
uint64 nonce = 3;- Specified by:
getNoncein interfaceCommonProto.BlockOrBuilder- Returns:
- The nonce.
-
getParentHashesList
父区块的哈希
repeated bytes parent_hashes = 4;- Specified by:
getParentHashesListin interfaceCommonProto.BlockOrBuilder- Returns:
- A list containing the parentHashes.
-
getParentHashesCount
public int getParentHashesCount()父区块的哈希
repeated bytes parent_hashes = 4;- Specified by:
getParentHashesCountin interfaceCommonProto.BlockOrBuilder- Returns:
- The count of parentHashes.
-
getParentHashes
public com.google.protobuf.ByteString getParentHashes(int index) 父区块的哈希
repeated bytes parent_hashes = 4;- Specified by:
getParentHashesin 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:
getWitnessesListin interfaceCommonProto.BlockOrBuilder- Returns:
- A list containing the witnesses.
-
getWitnessesCount
public int getWitnessesCount()见证者账户地址
repeated bytes witnesses = 5;- Specified by:
getWitnessesCountin interfaceCommonProto.BlockOrBuilder- Returns:
- The count of witnesses.
-
getWitnesses
public com.google.protobuf.ByteString getWitnesses(int index) 见证者账户地址
repeated bytes witnesses = 5;- Specified by:
getWitnessesin 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:
getTimestampin interfaceCommonProto.BlockOrBuilder- Returns:
- The timestamp.
-
getSize
public long getSize()区块大小的字节数
uint64 size = 7;- Specified by:
getSizein interfaceCommonProto.BlockOrBuilder- Returns:
- The size.
-
getTransactionCount
public int getTransactionCount()区块包含的事务数量
uint32 transaction_count = 8;- Specified by:
getTransactionCountin interfaceCommonProto.BlockOrBuilder- Returns:
- The transactionCount.
-
getTransactionsRoot
public com.google.protobuf.ByteString getTransactionsRoot()区块的事务默克尔树根
bytes transactions_root = 9;- Specified by:
getTransactionsRootin interfaceCommonProto.BlockOrBuilder- Returns:
- The transactionsRoot.
-
getTransactionsList
事务对象的数组,或为空
repeated .bdware.bdledger.api.Transaction transactions = 10;- Specified by:
getTransactionsListin interfaceCommonProto.BlockOrBuilder
-
getTransactionsOrBuilderList
事务对象的数组,或为空
repeated .bdware.bdledger.api.Transaction transactions = 10;- Specified by:
getTransactionsOrBuilderListin interfaceCommonProto.BlockOrBuilder
-
getTransactionsCount
public int getTransactionsCount()事务对象的数组,或为空
repeated .bdware.bdledger.api.Transaction transactions = 10;- Specified by:
getTransactionsCountin interfaceCommonProto.BlockOrBuilder
-
getTransactions
事务对象的数组,或为空
repeated .bdware.bdledger.api.Transaction transactions = 10;- Specified by:
getTransactionsin interfaceCommonProto.BlockOrBuilder
-
getTransactionsOrBuilder
事务对象的数组,或为空
repeated .bdware.bdledger.api.Transaction transactions = 10;- Specified by:
getTransactionsOrBuilderin interfaceCommonProto.BlockOrBuilder
-
getTransactionHashesList
20字节的事务哈希的数组,或为空
repeated bytes transaction_hashes = 11;- Specified by:
getTransactionHashesListin interfaceCommonProto.BlockOrBuilder- Returns:
- A list containing the transactionHashes.
-
getTransactionHashesCount
public int getTransactionHashesCount()20字节的事务哈希的数组,或为空
repeated bytes transaction_hashes = 11;- Specified by:
getTransactionHashesCountin interfaceCommonProto.BlockOrBuilder- Returns:
- The count of transactionHashes.
-
getTransactionHashes
public com.google.protobuf.ByteString getTransactionHashes(int index) 20字节的事务哈希的数组,或为空
repeated bytes transaction_hashes = 11;- Specified by:
getTransactionHashesin 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:
getCreatorSignaturein interfaceCommonProto.BlockOrBuilder- Returns:
- The creatorSignature.
-
getWitnessSignaturesList
见证者签名
repeated bytes witness_signatures = 13;- Specified by:
getWitnessSignaturesListin interfaceCommonProto.BlockOrBuilder- Returns:
- A list containing the witnessSignatures.
-
getWitnessSignaturesCount
public int getWitnessSignaturesCount()见证者签名
repeated bytes witness_signatures = 13;- Specified by:
getWitnessSignaturesCountin interfaceCommonProto.BlockOrBuilder- Returns:
- The count of witnessSignatures.
-
getWitnessSignatures
public com.google.protobuf.ByteString getWitnessSignatures(int index) 见证者签名
repeated bytes witness_signatures = 13;- Specified by:
getWitnessSignaturesin 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:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein 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:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected CommonProto.Block.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-