diff --git a/slasher/src/database.rs b/slasher/src/database.rs index 13c5d2b774..673e15d3b2 100644 --- a/slasher/src/database.rs +++ b/slasher/src/database.rs @@ -819,7 +819,7 @@ impl SlasherDB { #[cfg(test)] mod test { use super::*; - use types::{Checkpoint, MainnetEthSpec}; + use types::{Checkpoint, MainnetEthSpec, Unsigned}; type E = MainnetEthSpec; @@ -830,6 +830,7 @@ mod test { AttestationData, AggregateSignature, ) -> IndexedAttestation, + committee_len: u64, ) { let attestation_data = AttestationData { slot: Slot::new(1000), @@ -845,7 +846,7 @@ mod test { }, }; - let attesting_indices = vec![1, 14, 160, 812737]; + let attesting_indices = (0..committee_len).collect::>(); let signature = AggregateSignature::infinity(); let fork_attestation = make_attestation( @@ -880,7 +881,11 @@ mod test { signature, }) }; - indexed_attestation_on_disk_roundtrip_test(&spec, make_attestation) + indexed_attestation_on_disk_roundtrip_test( + &spec, + make_attestation, + ::MaxValidatorsPerCommittee::to_u64(), + ) } #[test] @@ -893,6 +898,10 @@ mod test { signature, }) }; - indexed_attestation_on_disk_roundtrip_test(&spec, make_attestation) + indexed_attestation_on_disk_roundtrip_test( + &spec, + make_attestation, + ::MaxValidatorsPerSlot::to_u64(), + ) } }