Skip to main content

validate_shards

Function validate_shards 

Source
fn validate_shards(shards: usize) -> Result<(), ValidationError>
Expand description

Rejects a shard count that is out of range or not a power of two.

Power of two so TagReplayFilter::shard_for can mask rather than divide, and so every shard stays addressable.