mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 09:16:00 +00:00
Update database.rs
This commit is contained in:
@@ -819,7 +819,7 @@ impl<E: EthSpec> SlasherDB<E> {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
use super::*;
|
||||||
use types::{Checkpoint, MainnetEthSpec};
|
use types::{Checkpoint, MainnetEthSpec, Unsigned};
|
||||||
|
|
||||||
type E = MainnetEthSpec;
|
type E = MainnetEthSpec;
|
||||||
|
|
||||||
@@ -830,6 +830,7 @@ mod test {
|
|||||||
AttestationData,
|
AttestationData,
|
||||||
AggregateSignature,
|
AggregateSignature,
|
||||||
) -> IndexedAttestation<E>,
|
) -> IndexedAttestation<E>,
|
||||||
|
committee_len: u64,
|
||||||
) {
|
) {
|
||||||
let attestation_data = AttestationData {
|
let attestation_data = AttestationData {
|
||||||
slot: Slot::new(1000),
|
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::<Vec<_>>();
|
||||||
let signature = AggregateSignature::infinity();
|
let signature = AggregateSignature::infinity();
|
||||||
|
|
||||||
let fork_attestation = make_attestation(
|
let fork_attestation = make_attestation(
|
||||||
@@ -880,7 +881,11 @@ mod test {
|
|||||||
signature,
|
signature,
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
indexed_attestation_on_disk_roundtrip_test(&spec, make_attestation)
|
indexed_attestation_on_disk_roundtrip_test(
|
||||||
|
&spec,
|
||||||
|
make_attestation,
|
||||||
|
<E as EthSpec>::MaxValidatorsPerCommittee::to_u64(),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -893,6 +898,10 @@ mod test {
|
|||||||
signature,
|
signature,
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
indexed_attestation_on_disk_roundtrip_test(&spec, make_attestation)
|
indexed_attestation_on_disk_roundtrip_test(
|
||||||
|
&spec,
|
||||||
|
make_attestation,
|
||||||
|
<E as EthSpec>::MaxValidatorsPerSlot::to_u64(),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user