Skip to content

Commit 4b3dabf

Browse files
committed
Fix tests
1 parent acd6d62 commit 4b3dabf

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

beacon_node/http_api/tests/interactive_tests.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,14 @@ async fn proposer_duties_with_gossip_tolerance() {
10571057
// have been updated with the correct values.
10581058
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
10591059
async fn lighthouse_restart_custody_backfill() {
1060-
let spec = test_spec::<E>();
1060+
let mut spec = test_spec::<E>();
1061+
1062+
spec.altair_fork_epoch = Some(Epoch::new(0));
1063+
spec.bellatrix_fork_epoch = Some(Epoch::new(0));
1064+
spec.capella_fork_epoch = Some(Epoch::new(0));
1065+
spec.deneb_fork_epoch = Some(Epoch::new(0));
1066+
spec.electra_fork_epoch = Some(Epoch::new(0));
1067+
spec.fulu_fork_epoch = Some(Epoch::new(0));
10611068

10621069
let validator_count = 24;
10631070

@@ -1120,6 +1127,13 @@ async fn lighthouse_custody_info() {
11201127
spec.min_epochs_for_blob_sidecars_requests = 2;
11211128
spec.min_epochs_for_data_column_sidecars_requests = 2;
11221129

1130+
spec.altair_fork_epoch = Some(Epoch::new(0));
1131+
spec.bellatrix_fork_epoch = Some(Epoch::new(0));
1132+
spec.capella_fork_epoch = Some(Epoch::new(0));
1133+
spec.deneb_fork_epoch = Some(Epoch::new(0));
1134+
spec.electra_fork_epoch = Some(Epoch::new(0));
1135+
spec.fulu_fork_epoch = Some(Epoch::new(0));
1136+
11231137
let validator_count = 24;
11241138

11251139
let tester = InteractiveTester::<E>::new(Some(spec), validator_count).await;

common/eth2/src/types.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,20 +1522,15 @@ pub struct ForkChoiceNode {
15221522
pub execution_block_hash: Option<Hash256>,
15231523
}
15241524

1525-
#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
1525+
#[derive(Copy, Clone, Default, Debug, Serialize, Deserialize, PartialEq, Eq)]
15261526
#[serde(rename_all = "snake_case")]
15271527
pub enum BroadcastValidation {
1528+
#[default]
15281529
Gossip,
15291530
Consensus,
15301531
ConsensusAndEquivocation,
15311532
}
15321533

1533-
impl Default for BroadcastValidation {
1534-
fn default() -> Self {
1535-
Self::Gossip
1536-
}
1537-
}
1538-
15391534
impl Display for BroadcastValidation {
15401535
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
15411536
match self {

validator_client/initialized_validators/src/key_cache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ mod tests {
291291
#[tokio::test]
292292
async fn test_encryption() {
293293
let mut key_cache = KeyCache::new();
294-
let keypairs = vec![Keypair::random(), Keypair::random()];
294+
let keypairs = [Keypair::random(), Keypair::random()];
295295
let uuids = vec![Uuid::from_u128(1), Uuid::from_u128(2)];
296296
let passwords = vec![
297297
PlainText::from(vec![1, 2, 3, 4, 5, 6]),

0 commit comments

Comments
 (0)