mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-02 16:21:42 +00:00
Use E for EthSpec globally (#5264)
* Use `E` for `EthSpec` globally * Fix tests * Merge branch 'unstable' into e-ethspec * Merge branch 'unstable' into e-ethspec # Conflicts: # beacon_node/execution_layer/src/engine_api.rs # beacon_node/execution_layer/src/engine_api/http.rs # beacon_node/execution_layer/src/engine_api/json_structures.rs # beacon_node/execution_layer/src/test_utils/handle_rpc.rs # beacon_node/store/src/partial_beacon_state.rs # consensus/types/src/beacon_block.rs # consensus/types/src/beacon_block_body.rs # consensus/types/src/beacon_state.rs # consensus/types/src/config_and_preset.rs # consensus/types/src/execution_payload.rs # consensus/types/src/execution_payload_header.rs # consensus/types/src/light_client_optimistic_update.rs # consensus/types/src/payload.rs # lcli/src/parse_ssz.rs
This commit is contained in:
@@ -24,23 +24,23 @@ const EXECUTION_ENGINE_START_TIMEOUT: Duration = Duration::from_secs(60);
|
||||
|
||||
const TEST_FORK: ForkName = ForkName::Capella;
|
||||
|
||||
struct ExecutionPair<E, T: EthSpec> {
|
||||
struct ExecutionPair<Engine, E: EthSpec> {
|
||||
/// The Lighthouse `ExecutionLayer` struct, connected to the `execution_engine` via HTTP.
|
||||
execution_layer: ExecutionLayer<T>,
|
||||
execution_layer: ExecutionLayer<E>,
|
||||
/// A handle to external EE process, once this is dropped the process will be killed.
|
||||
#[allow(dead_code)]
|
||||
execution_engine: ExecutionEngine<E>,
|
||||
execution_engine: ExecutionEngine<Engine>,
|
||||
}
|
||||
|
||||
/// A rig that holds two EE processes for testing.
|
||||
///
|
||||
/// There are two EEs held here so that we can test out-of-order application of payloads, and other
|
||||
/// edge-cases.
|
||||
pub struct TestRig<E, T: EthSpec = MainnetEthSpec> {
|
||||
pub struct TestRig<Engine, E: EthSpec = MainnetEthSpec> {
|
||||
#[allow(dead_code)]
|
||||
runtime: Arc<tokio::runtime::Runtime>,
|
||||
ee_a: ExecutionPair<E, T>,
|
||||
ee_b: ExecutionPair<E, T>,
|
||||
ee_a: ExecutionPair<Engine, E>,
|
||||
ee_b: ExecutionPair<Engine, E>,
|
||||
spec: ChainSpec,
|
||||
_runtime_shutdown: async_channel::Sender<()>,
|
||||
}
|
||||
@@ -102,8 +102,8 @@ async fn import_and_unlock(http_url: SensitiveUrl, priv_keys: &[&str], password:
|
||||
}
|
||||
}
|
||||
|
||||
impl<E: GenericExecutionEngine> TestRig<E> {
|
||||
pub fn new(generic_engine: E) -> Self {
|
||||
impl<Engine: GenericExecutionEngine> TestRig<Engine> {
|
||||
pub fn new(generic_engine: Engine) -> Self {
|
||||
let log = logging::test_logger();
|
||||
let runtime = Arc::new(
|
||||
tokio::runtime::Builder::new_multi_thread()
|
||||
|
||||
Reference in New Issue
Block a user