Function Ledger.validatorCount
Get the count of active validators at a given height.
This function is more efficient than checking the length of the array
returned by getValidators
as it avoids any intermediate allocation.
An 'active' validator is one that hasn't been slashed,
and may sign a block. A validator that enrolls, reveal all its
pre-images but never sign a block will still be counted as 'active'.
Parameters
Name | Description |
---|---|
height | Height at which to query the validator set.
Accurate results are only guaranteed for
height <= this . |
Returns
Number of active validators at height
.