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:
  • 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

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getUnknownFields

      public final com.google.protobuf.UnknownFieldSet getUnknownFields()
      Specified by:
      getUnknownFields in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getUnknownFields in class com.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 class com.google.protobuf.GeneratedMessageV3
    • getHash

      public com.google.protobuf.ByteString getHash()
       区块的哈希,当区块处于待确认状态时为`null`
       
      bytes hash = 1;
      Specified by:
      getHash in interface CommonProto.BlockOrBuilder
      Returns:
      The hash.
    • getCreator

      public com.google.protobuf.ByteString getCreator()
       产块者账户地址
       
      bytes creator = 2;
      Specified by:
      getCreator in interface CommonProto.BlockOrBuilder
      Returns:
      The creator.
    • getNonce

      public long getNonce()
       这个区块之前产块者产生的区块数量
       
      uint64 nonce = 3;
      Specified by:
      getNonce in interface CommonProto.BlockOrBuilder
      Returns:
      The nonce.
    • getParentHashesList

      public List<com.google.protobuf.ByteString> getParentHashesList()
       父区块的哈希
       
      repeated bytes parent_hashes = 4;
      Specified by:
      getParentHashesList in interface CommonProto.BlockOrBuilder
      Returns:
      A list containing the parentHashes.
    • getParentHashesCount

      public int getParentHashesCount()
       父区块的哈希
       
      repeated bytes parent_hashes = 4;
      Specified by:
      getParentHashesCount in interface CommonProto.BlockOrBuilder
      Returns:
      The count of parentHashes.
    • getParentHashes

      public com.google.protobuf.ByteString getParentHashes(int index)
       父区块的哈希
       
      repeated bytes parent_hashes = 4;
      Specified by:
      getParentHashes in interface CommonProto.BlockOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The parentHashes at the given index.
    • getWitnessesList

      public List<com.google.protobuf.ByteString> getWitnessesList()
       见证者账户地址
       
      repeated bytes witnesses = 5;
      Specified by:
      getWitnessesList in interface CommonProto.BlockOrBuilder
      Returns:
      A list containing the witnesses.
    • getWitnessesCount

      public int getWitnessesCount()
       见证者账户地址
       
      repeated bytes witnesses = 5;
      Specified by:
      getWitnessesCount in interface CommonProto.BlockOrBuilder
      Returns:
      The count of witnesses.
    • getWitnesses

      public com.google.protobuf.ByteString getWitnesses(int index)
       见证者账户地址
       
      repeated bytes witnesses = 5;
      Specified by:
      getWitnesses in interface CommonProto.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 interface CommonProto.BlockOrBuilder
      Returns:
      The timestamp.
    • getSize

      public long getSize()
       区块大小的字节数
       
      uint64 size = 7;
      Specified by:
      getSize in interface CommonProto.BlockOrBuilder
      Returns:
      The size.
    • getTransactionCount

      public int getTransactionCount()
       区块包含的事务数量
       
      uint32 transaction_count = 8;
      Specified by:
      getTransactionCount in interface CommonProto.BlockOrBuilder
      Returns:
      The transactionCount.
    • getTransactionsRoot

      public com.google.protobuf.ByteString getTransactionsRoot()
       区块的事务默克尔树根
       
      bytes transactions_root = 9;
      Specified by:
      getTransactionsRoot in interface CommonProto.BlockOrBuilder
      Returns:
      The transactionsRoot.
    • getTransactionsList

      public List<CommonProto.Transaction> getTransactionsList()
       事务对象的数组,或为空
       
      repeated .bdware.bdledger.api.Transaction transactions = 10;
      Specified by:
      getTransactionsList in interface CommonProto.BlockOrBuilder
    • getTransactionsOrBuilderList

      public List<? extends CommonProto.TransactionOrBuilder> getTransactionsOrBuilderList()
       事务对象的数组,或为空
       
      repeated .bdware.bdledger.api.Transaction transactions = 10;
      Specified by:
      getTransactionsOrBuilderList in interface CommonProto.BlockOrBuilder
    • getTransactionsCount

      public int getTransactionsCount()
       事务对象的数组,或为空
       
      repeated .bdware.bdledger.api.Transaction transactions = 10;
      Specified by:
      getTransactionsCount in interface CommonProto.BlockOrBuilder
    • getTransactions

      public CommonProto.Transaction getTransactions(int index)
       事务对象的数组,或为空
       
      repeated .bdware.bdledger.api.Transaction transactions = 10;
      Specified by:
      getTransactions in interface CommonProto.BlockOrBuilder
    • getTransactionsOrBuilder

      public CommonProto.TransactionOrBuilder getTransactionsOrBuilder(int index)
       事务对象的数组,或为空
       
      repeated .bdware.bdledger.api.Transaction transactions = 10;
      Specified by:
      getTransactionsOrBuilder in interface CommonProto.BlockOrBuilder
    • getTransactionHashesList

      public List<com.google.protobuf.ByteString> getTransactionHashesList()
       20字节的事务哈希的数组,或为空
       
      repeated bytes transaction_hashes = 11;
      Specified by:
      getTransactionHashesList in interface CommonProto.BlockOrBuilder
      Returns:
      A list containing the transactionHashes.
    • getTransactionHashesCount

      public int getTransactionHashesCount()
       20字节的事务哈希的数组,或为空
       
      repeated bytes transaction_hashes = 11;
      Specified by:
      getTransactionHashesCount in interface CommonProto.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 interface CommonProto.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 interface CommonProto.BlockOrBuilder
      Returns:
      The creatorSignature.
    • getWitnessSignaturesList

      public List<com.google.protobuf.ByteString> getWitnessSignaturesList()
       见证者签名
       
      repeated bytes witness_signatures = 13;
      Specified by:
      getWitnessSignaturesList in interface CommonProto.BlockOrBuilder
      Returns:
      A list containing the witnessSignatures.
    • getWitnessSignaturesCount

      public int getWitnessSignaturesCount()
       见证者签名
       
      repeated bytes witness_signatures = 13;
      Specified by:
      getWitnessSignaturesCount in interface CommonProto.BlockOrBuilder
      Returns:
      The count of witnessSignatures.
    • getWitnessSignatures

      public com.google.protobuf.ByteString getWitnessSignatures(int index)
       见证者签名
       
      repeated bytes witness_signatures = 13;
      Specified by:
      getWitnessSignatures in interface CommonProto.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 interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.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

      public static CommonProto.Block parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static CommonProto.Block parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static CommonProto.Block parseDelimitedFrom(InputStream input) throws IOException
      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

      public CommonProto.Block.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static CommonProto.Block.Builder newBuilder()
    • newBuilder

      public static CommonProto.Block.Builder newBuilder(CommonProto.Block prototype)
    • toBuilder

      public CommonProto.Block.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected CommonProto.Block.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static CommonProto.Block getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<CommonProto.Block> parser()
    • getParserForType

      public com.google.protobuf.Parser<CommonProto.Block> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public CommonProto.Block getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder