Fabric client java-getting blockheight


jeff.jo95z@...
 

hi,
For fabric gateway ,blockheight was found like this:

Contract qscc = networkObj.getContract("qscc");
byte[] resultTran = qscc.evaluateTransaction("GetChainInfo", "channelName"); 
Ledger.BlockchainInfo info = Ledger.BlockchainInfo.parseFrom(resultTran);
long blockHeight = info.getHeight();

How to get the block height using fabric client (java)?