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

Michael Wang

yes, you maybe can not get the latest info about height. But if the channel is alive the height will not be static. There are always transactions around.
I am not sure how much sense it will make to know exact height at the fixed time. 

Can you tell more about your scenario about this?

On Wed, Nov 28, 2018 at 6:34 PM <andychen.chen@...> wrote:
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.

This is my life,but world of us~~

Join to automatically receive all group messages.