How to get the ledger height of channel in real time? #fabric-sdk-node


andychen.chen@...
 

As we know, one channel can have multiple peers, and when we query ledger height , we need to specify one peer in the channel, but if this peer's ledger is not up to date(e.g. not a leader peer, network issue,sync delay),we will not get the latest ledger data.

Obviously, it's not good to do a circle check on all peers in channel to get the ledger data which has the biggest height.
Is there any other way to achieve this? e.g. can we know which peer is leader peer in a channel in fabric sdk? suppose leader peer should have the latest ledger data.

Join fabric@lists.hyperledger.org to automatically receive all group messages.