mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-14 21:50:52 +00:00
Consensus updates for v0.12 (#1228)
* Update state processing for v0.12 * Fix EF test runners for v0.12 * Fix some tests * Fix broken attestation verification test * More test fixes * Fix typo found in review
This commit is contained in:
@@ -28,6 +28,25 @@ fn minimal_config_ok() {
|
||||
config_test::<MinimalEthSpec>();
|
||||
}
|
||||
|
||||
// Check that the hand-computed multiplications on EthSpec are correctly computed.
|
||||
// This test lives here because one is most likely to muck these up during a spec update.
|
||||
fn check_typenum_values<E: EthSpec>() {
|
||||
assert_eq!(
|
||||
E::MaxPendingAttestations::to_u64(),
|
||||
E::MaxAttestations::to_u64() * E::SlotsPerEpoch::to_u64()
|
||||
);
|
||||
assert_eq!(
|
||||
E::SlotsPerEth1VotingPeriod::to_u64(),
|
||||
E::EpochsPerEth1VotingPeriod::to_u64() * E::SlotsPerEpoch::to_u64()
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn derived_typenum_values() {
|
||||
check_typenum_values::<MinimalEthSpec>();
|
||||
check_typenum_values::<MainnetEthSpec>();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn shuffling() {
|
||||
ShufflingHandler::<MinimalEthSpec>::run();
|
||||
|
||||
Reference in New Issue
Block a user