Class BlockInfo

  • Direct Known Subclasses:
    BlockEvent


    public class BlockInfo
    extends java.lang.Object
    BlockInfo contains the data from a Common.Block
    • Method Detail

      • isFiltered

        public boolean isFiltered​()
      • getChannelId

        public java.lang.String getChannelId​()
                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • getBlock

        public org.hyperledger.fabric.protos.common.Common.Block getBlock​()
        Returns:
        the raw Common.Block
      • getFilteredBlock

        public org.hyperledger.fabric.protos.peer.PeerEvents.FilteredBlock getFilteredBlock​()
        Returns:
        the raw PeerEvents.FilteredBlock
      • getPreviousHash

        public byte[] getPreviousHash​()
        Returns:
        the Common.Block previousHash value and null if filtered block.
      • getDataHash

        public byte[] getDataHash​()
        Returns:
        the Common.Block data hash value and null if filtered block.
      • getTransActionsMetaData

        public byte[] getTransActionsMetaData​()
        Returns:
        the Common.Block transaction metadata value return null if filtered block.
      • getBlockNumber

        public long getBlockNumber​()
        Returns:
        the Common.Block index number
      • getEnvelopeCount

        public int getEnvelopeCount​()
        getEnvelopeCount
        Returns:
        the number of transactions in this block.
      • getTransactionCount

        public int getTransactionCount​()
        Number of endorser transaction found in the block.
        Returns:
        Number of endorser transaction found in the block.
      • getEnvelopeInfo

        public BlockInfo.EnvelopeInfo getEnvelopeInfo​(int envelopeIndex)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Return a specific envelope in the block by it's index.
        Parameters:
        envelopeIndex -
        Returns:
        EnvelopeInfo that contains information on the envelope.
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • getEnvelopeInfos

        public java.lang.Iterable<BlockInfo.EnvelopeInfo> getEnvelopeInfos​()
        Return and iterable EnvelopeInfo over each Envelope contained in the Block
        Returns: