mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2025-01-09 12:31:23 +00:00
Updates validation tests for clippy modifications
This commit is contained in:
parent
fd01ffc2a1
commit
14e12db374
@ -172,19 +172,19 @@ mod tests {
|
|||||||
fn generate_cycle_helper(
|
fn generate_cycle_helper(
|
||||||
validator_count: &usize,
|
validator_count: &usize,
|
||||||
shard_count: &usize,
|
shard_count: &usize,
|
||||||
crosslinking_shard_start: &usize,
|
crosslinking_shard_start: usize,
|
||||||
cycle_length: &usize,
|
cycle_length: usize,
|
||||||
min_committee_size: &usize)
|
min_committee_size: usize)
|
||||||
-> (Vec<usize>, Vec<usize>, Result<DelegatedCycle, TransitionError>)
|
-> (Vec<usize>, Vec<usize>, Result<DelegatedCycle, TransitionError>)
|
||||||
{
|
{
|
||||||
let validator_indices = (0_usize..*validator_count).into_iter().collect();
|
let validator_indices: Vec<usize> = (0_usize..*validator_count).into_iter().collect();
|
||||||
let shard_indices = (0_usize..*shard_count).into_iter().collect();
|
let shard_indices: Vec<usize> = (0_usize..*shard_count).into_iter().collect();
|
||||||
let result = generate_cycle(
|
let result = generate_cycle(
|
||||||
&validator_indices,
|
&validator_indices,
|
||||||
&shard_indices,
|
&shard_indices,
|
||||||
&crosslinking_shard_start,
|
crosslinking_shard_start,
|
||||||
&cycle_length,
|
cycle_length,
|
||||||
&min_committee_size);
|
min_committee_size);
|
||||||
(validator_indices, shard_indices, result)
|
(validator_indices, shard_indices, result)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -255,9 +255,9 @@ mod tests {
|
|||||||
let (validators, shards, result) = generate_cycle_helper(
|
let (validators, shards, result) = generate_cycle_helper(
|
||||||
&validator_count,
|
&validator_count,
|
||||||
&shard_count,
|
&shard_count,
|
||||||
&crosslinking_shard_start,
|
crosslinking_shard_start,
|
||||||
&cycle_length,
|
cycle_length,
|
||||||
&min_committee_size);
|
min_committee_size);
|
||||||
let cycle = result.unwrap();
|
let cycle = result.unwrap();
|
||||||
|
|
||||||
let assigned_validators = flatten_validators(&cycle);
|
let assigned_validators = flatten_validators(&cycle);
|
||||||
@ -294,9 +294,9 @@ mod tests {
|
|||||||
let (validators, shards, result) = generate_cycle_helper(
|
let (validators, shards, result) = generate_cycle_helper(
|
||||||
&validator_count,
|
&validator_count,
|
||||||
&shard_count,
|
&shard_count,
|
||||||
&crosslinking_shard_start,
|
crosslinking_shard_start,
|
||||||
&cycle_length,
|
cycle_length,
|
||||||
&min_committee_size);
|
min_committee_size);
|
||||||
let cycle = result.unwrap();
|
let cycle = result.unwrap();
|
||||||
let assigned_validators = flatten_validators(&cycle);
|
let assigned_validators = flatten_validators(&cycle);
|
||||||
let assigned_shards = flatten_and_dedup_shards(&cycle);
|
let assigned_shards = flatten_and_dedup_shards(&cycle);
|
||||||
|
Loading…
Reference in New Issue
Block a user