use of org.hyperledger.fabric.protos.common.Common.BlockMetadata in project fabric-sdk-java by hyperledger.
the class Channel method getLastConfigIndex.
private long getLastConfigIndex(Orderer orderer) throws TransactionException, InvalidProtocolBufferException {
Block latestBlock = getLatestBlock(orderer);
BlockMetadata blockMetadata = latestBlock.getMetadata();
Metadata metaData = Metadata.parseFrom(blockMetadata.getMetadata(1));
LastConfig lastConfig = LastConfig.parseFrom(metaData.getValue());
return lastConfig.getIndex();
}
Aggregations