Better fix for debug tests

This commit is contained in:
Emilia Hane 2023-02-15 11:47:56 +01:00
parent 9fea440ae6
commit 2672cf40bb
No known key found for this signature in database
GPG Key ID: E73394F9C09206FA
3 changed files with 9 additions and 10 deletions

View File

@ -185,10 +185,10 @@ impl<T: BeaconChainTypes> ParentLookup<T> {
None
}
/*#[cfg(test)]
#[cfg(test)]
pub fn failed_attempts(&self) -> u8 {
self.current_parent_request.failed_attempts()
}*/
}
pub fn add_peer(&mut self, block_root: &Hash256, peer_id: &PeerId) -> bool {
self.current_parent_request.add_peer(block_root, peer_id)

View File

@ -1,4 +1,4 @@
/*use std::sync::Arc;
use std::sync::Arc;
use crate::service::RequestId;
use crate::sync::manager::RequestId as SyncId;
@ -13,7 +13,7 @@ use beacon_chain::{
};
pub use genesis::{interop_genesis_state, DEFAULT_ETH1_BLOCK_HASH};
use lighthouse_network::{NetworkGlobals, Request};
use slot_clock::SystemTimeSlotClock;
use slot_clock::TestingSlotClock;
use std::time::Duration;
use store::MemoryStore;
use tokio::sync::mpsc;
@ -22,7 +22,7 @@ use types::{
MinimalEthSpec as E, SignedBeaconBlock,
};
type T = Witness<SystemTimeSlotClock, CachingEth1Backend<E>, E, MemoryStore<E>, MemoryStore<E>>;
type T = Witness<TestingSlotClock, CachingEth1Backend<E>, E, MemoryStore<E>, MemoryStore<E>>;
struct TestRig {
beacon_processor_rx: mpsc::Receiver<WorkEvent<T>>,
@ -711,4 +711,4 @@ fn test_same_chain_race_condition() {
};
bl.parent_chain_processed(chain_hash, process_result, &mut cx);
assert_eq!(bl.parent_lookups.len(), 0);
}*/
}

View File

@ -370,7 +370,6 @@ where
}
}
/*
#[cfg(test)]
mod tests {
use super::*;
@ -390,7 +389,7 @@ mod tests {
NetworkGlobals, Request,
};
use slog::o;
use slot_clock::SystemTimeSlotClock;
use slot_clock::TestingSlotClock;
use std::{collections::HashSet, sync::Arc};
use store::MemoryStore;
use tokio::sync::mpsc;
@ -441,7 +440,7 @@ mod tests {
}
type TestBeaconChainType =
Witness<SystemTimeSlotClock, CachingEth1Backend<E>, E, MemoryStore<E>, MemoryStore<E>>;
Witness<TestingSlotClock, CachingEth1Backend<E>, E, MemoryStore<E>, MemoryStore<E>>;
#[allow(unused)]
struct TestRig {
@ -725,4 +724,4 @@ mod tests {
rig.expect_chain_segment();
rig.expect_chain_segment();
}
}*/
}