Package org.hyperledger.fabric.sdk
Class BlockInfo
- java.lang.Object
-
- org.hyperledger.fabric.sdk.BlockInfo
-
- Direct Known Subclasses:
BlockEvent
public class BlockInfo extends java.lang.Object
BlockInfo contains the data from aCommon.Block
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BlockInfo.EndorserInfo
class
BlockInfo.EnvelopeInfo
Wrappers Envelopestatic class
BlockInfo.EnvelopeType
class
BlockInfo.TransactionEnvelopeInfo
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.hyperledger.fabric.protos.common.Common.Block
getBlock()
long
getBlockNumber()
java.lang.String
getChannelId()
byte[]
getDataHash()
int
getEnvelopeCount()
getEnvelopeCountBlockInfo.EnvelopeInfo
getEnvelopeInfo(int envelopeIndex)
Return a specific envelope in the block by it's index.java.lang.Iterable<BlockInfo.EnvelopeInfo>
getEnvelopeInfos()
Return and iterable EnvelopeInfo over each Envelope contained in the Blockorg.hyperledger.fabric.protos.peer.PeerEvents.FilteredBlock
getFilteredBlock()
byte[]
getPreviousHash()
int
getTransactionCount()
Number of endorser transaction found in the block.byte[]
getTransActionsMetaData()
boolean
isFiltered()
-
-
-
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:
-
-