public class BlockInfo extends Object
Common.Block
Modifier and Type | Class and Description |
---|---|
static class |
BlockInfo.EndorserInfo |
class |
BlockInfo.EnvelopeInfo
Wrappers Envelope
|
static class |
BlockInfo.EnvelopeType |
class |
BlockInfo.TransactionEnvelopeInfo |
static class |
BlockInfo.Type
Block event type information.
|
Modifier and Type | Method and Description |
---|---|
org.hyperledger.fabric.protos.common.Common.Block |
getBlock() |
org.hyperledger.fabric.protos.peer.EventsPackage.BlockAndPrivateData |
getBlockAndPrivateData() |
long |
getBlockNumber() |
String |
getChannelId() |
byte[] |
getDataHash() |
int |
getEnvelopeCount()
getEnvelopeCount
|
BlockInfo.EnvelopeInfo |
getEnvelopeInfo(int envelopeIndex)
Return a specific envelope in the block by it's index.
|
Iterable<BlockInfo.EnvelopeInfo> |
getEnvelopeInfos()
Return and iterable EnvelopeInfo over each Envelope contained in the Block
|
org.hyperledger.fabric.protos.peer.EventsPackage.FilteredBlock |
getFilteredBlock() |
byte[] |
getPreviousHash() |
int |
getTransactionCount()
Number of endorser transaction found in the block.
|
byte[] |
getTransActionsMetaData() |
BlockInfo.Type |
getType()
Block type information.
|
boolean |
isFiltered() |
public boolean isFiltered()
public BlockInfo.Type getType()
getBlock()
, getFilteredBlock()
and getBlockAndPrivateData()
.public String getChannelId() throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public org.hyperledger.fabric.protos.common.Common.Block getBlock()
getType()
is BlockInfo.Type.BLOCK
or BlockInfo.Type.BLOCK_WITH_PRIVATE_DATA
, the raw Common.Block
;
otherwise null
.public org.hyperledger.fabric.protos.peer.EventsPackage.FilteredBlock getFilteredBlock()
getType()
is BlockInfo.Type.FILTERED_BLOCK
, the raw EventsPackage.FilteredBlock
;
otherwise null
.public org.hyperledger.fabric.protos.peer.EventsPackage.BlockAndPrivateData getBlockAndPrivateData()
getType()
is BlockInfo.Type.BLOCK_WITH_PRIVATE_DATA
, the raw EventsPackage.BlockAndPrivateData
;
otherwise null
.public byte[] getPreviousHash()
Common.Block
previousHash value and null if filtered block.public byte[] getDataHash()
Common.Block
data hash value and null if filtered block.public byte[] getTransActionsMetaData()
Common.Block
transaction metadata value return null if filtered block.public long getBlockNumber()
Common.Block
index numberpublic int getEnvelopeCount()
public int getTransactionCount()
public BlockInfo.EnvelopeInfo getEnvelopeInfo(int envelopeIndex) throws com.google.protobuf.InvalidProtocolBufferException
envelopeIndex
- the index into list.com.google.protobuf.InvalidProtocolBufferException
public Iterable<BlockInfo.EnvelopeInfo> getEnvelopeInfos()
Copyright © 2022. All rights reserved.