mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 11:41:51 +00:00
enable tests
This commit is contained in:
@@ -42,7 +42,9 @@ excluded_paths = [
|
||||
"bls12-381-tests/deserialization_G2",
|
||||
"bls12-381-tests/hash_to_G2",
|
||||
"tests/.*/eip6110",
|
||||
"tests/.*/whisk"
|
||||
"tests/.*/whisk",
|
||||
"tests/.*/eip7594",
|
||||
"tests/.*/electra/ssz_static/LightClient*"
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -342,44 +342,33 @@ impl<E: EthSpec, T: EpochTransition<E>> Case for EpochProcessing<E, T> {
|
||||
}
|
||||
|
||||
fn is_enabled_for_fork(fork_name: ForkName) -> bool {
|
||||
// Deprecated tests
|
||||
let deprecated_in_altair = if fork_name > ForkName::Base {
|
||||
T::name() != "participation_record_updates"
|
||||
&& T::name() != "historical_summaries_update"
|
||||
} else {
|
||||
false
|
||||
};
|
||||
let deprecated_in_bellatrix = if fork_name > ForkName::Altair {
|
||||
T::name() != "historical_roots_update"
|
||||
} else {
|
||||
false
|
||||
};
|
||||
let deprecated_in_capella = if fork_name > ForkName::Bellatrix {
|
||||
T::name() != "historical_summaries_update"
|
||||
} else {
|
||||
false
|
||||
};
|
||||
if fork_name > ForkName::Base && (T::name() == "participation_record_updates") {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Added tests
|
||||
let added_in_altair = if fork_name < ForkName::Altair {
|
||||
T::name() != "sync_committee_updates"
|
||||
&& T::name() != "inactivity_updates"
|
||||
&& T::name() != "participation_flag_updates"
|
||||
&& T::name() != "historical_summaries_update"
|
||||
} else {
|
||||
false
|
||||
};
|
||||
let added_in_electra = if fork_name < ForkName::Electra {
|
||||
T::name() != "pending_consolidations" && T::name() != "pending_balance_deposits"
|
||||
} else {
|
||||
false
|
||||
};
|
||||
if fork_name > ForkName::Bellatrix && T::name() == "historical_roots_update" {
|
||||
return false;
|
||||
}
|
||||
|
||||
deprecated_in_altair
|
||||
&& deprecated_in_bellatrix
|
||||
&& deprecated_in_capella
|
||||
&& added_in_altair
|
||||
&& added_in_electra
|
||||
if fork_name < ForkName::Capella && T::name() == "historical_summaries_update" {
|
||||
return false;
|
||||
}
|
||||
|
||||
if fork_name < ForkName::Altair
|
||||
&& (T::name() == "sync_committee_updates"
|
||||
|| T::name() == "inactivity_updates"
|
||||
|| T::name() == "participation_flag_updates"
|
||||
|| T::name() == "historical_summaries_update")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if fork_name < ForkName::Electra
|
||||
&& (T::name() == "pending_consolidations" || T::name() == "pending_balance_deposits")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
fn result(&self, _case_index: usize, fork_name: ForkName) -> Result<(), Error> {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#![cfg(feature = "ef_tests")]
|
||||
|
||||
use ef_tests::*;
|
||||
use types::{MainnetEthSpec, MinimalEthSpec, *};
|
||||
use types::{ExecutionLayerWithdrawalRequest, MainnetEthSpec, 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.
|
||||
@@ -92,6 +92,24 @@ fn operations_withdrawals() {
|
||||
OperationsHandler::<MainnetEthSpec, WithdrawalsPayload<_>>::default().run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn operations_execution_layer_withdrawal_reqeusts() {
|
||||
OperationsHandler::<MinimalEthSpec, ExecutionLayerWithdrawalRequest>::default().run();
|
||||
OperationsHandler::<MainnetEthSpec, ExecutionLayerWithdrawalRequest>::default().run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn operations_deposit_receipts() {
|
||||
OperationsHandler::<MinimalEthSpec, DepositReceipt>::default().run();
|
||||
OperationsHandler::<MainnetEthSpec, DepositReceipt>::default().run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn operations_consolidations() {
|
||||
OperationsHandler::<MinimalEthSpec, SignedConsolidation>::default().run();
|
||||
OperationsHandler::<MainnetEthSpec, SignedConsolidation>::default().run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn operations_bls_to_execution_change() {
|
||||
OperationsHandler::<MinimalEthSpec, SignedBlsToExecutionChange>::default().run();
|
||||
|
||||
Reference in New Issue
Block a user