From 70a80d5da0441c94047da2f51d48a96312e9c9a6 Mon Sep 17 00:00:00 2001 From: Lion - dapplion <35266934+dapplion@users.noreply.github.com> Date: Fri, 21 Jun 2024 09:48:35 +0200 Subject: [PATCH] Update database.rs --- slasher/src/database.rs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) 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(), + ) } }