0

I used to set up a Fabric network and deployed a fabric network and basic application using a Fabric and Fabric node SDK. I'm able to do the query and write to the chain. Is there any way to retrieve the Block Info? Like block height and transactionID?

Darshan
  • 23
  • 1
  • 7

1 Answers1

0

In Hyperledger Fabric with node sdk you can retrieve the block info with the queryBlock method https://hyperledger.github.io/fabric-sdk-node/release-1.4/Channel.html#queryBlock

you can use it as let response_payload = await channel.queryBlock(parseInt(blockNumber, peer)); this will return the block details.

raza sikander
  • 143
  • 13