From e9e198a2b61bd5f29068702bd21605690fd50401 Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Mon, 6 Feb 2023 14:34:28 +0100 Subject: [PATCH] Fix conflicts rebasing eip4844 --- beacon_node/beacon_chain/src/builder.rs | 4 ++- .../beacon_chain/src/shuffling_cache.rs | 2 +- beacon_node/beacon_chain/src/test_utils.rs | 13 ++++++++++ .../tests/attestation_verification.rs | 9 ++++--- .../beacon_chain/tests/block_verification.rs | 12 +++++---- beacon_node/beacon_chain/tests/merge.rs | 4 +-- .../beacon_chain/tests/op_verification.rs | 3 ++- .../tests/payload_invalidation.rs | 6 ++--- beacon_node/beacon_chain/tests/store_tests.rs | 26 ++++++++++--------- .../tests/sync_committee_verification.rs | 14 ++++++---- beacon_node/beacon_chain/tests/tests.rs | 10 ++++--- beacon_node/http_api/tests/common.rs | 6 ++--- beacon_node/http_api/tests/tests.rs | 9 ++++--- .../network/src/beacon_processor/tests.rs | 4 +-- beacon_node/operation_pool/src/lib.rs | 22 +++++++++++----- .../slot_clock/src/system_time_slot_clock.rs | 6 ----- consensus/fork_choice/tests/tests.rs | 4 +-- 17 files changed, 93 insertions(+), 61 deletions(-) diff --git a/beacon_node/beacon_chain/src/builder.rs b/beacon_node/beacon_chain/src/builder.rs index 31d788dcf..0f29c9e09 100644 --- a/beacon_node/beacon_chain/src/builder.rs +++ b/beacon_node/beacon_chain/src/builder.rs @@ -1017,6 +1017,7 @@ fn descriptive_db_error(item: &str, error: &StoreError) -> String { #[cfg(test)] mod test { use super::*; + use crate::test_utils::EphemeralTestingSlotClockHarnessType; use crate::validator_monitor::DEFAULT_INDIVIDUAL_TRACKING_THRESHOLD; use eth2_hashing::hash; use genesis::{ @@ -1031,6 +1032,7 @@ mod test { use types::{EthSpec, MinimalEthSpec, Slot}; type TestEthSpec = MinimalEthSpec; + type Builder = BeaconChainBuilder>; fn get_logger() -> Logger { let builder = NullLoggerBuilder; @@ -1063,7 +1065,7 @@ mod test { let (shutdown_tx, _) = futures::channel::mpsc::channel(1); let runtime = TestRuntime::default(); - let chain = BeaconChainBuilder::new(MinimalEthSpec) + let chain = Builder::new(MinimalEthSpec) .logger(log.clone()) .store(Arc::new(store)) .task_executor(runtime.task_executor.clone()) diff --git a/beacon_node/beacon_chain/src/shuffling_cache.rs b/beacon_node/beacon_chain/src/shuffling_cache.rs index 2b1d5822a..15b9a33cb 100644 --- a/beacon_node/beacon_chain/src/shuffling_cache.rs +++ b/beacon_node/beacon_chain/src/shuffling_cache.rs @@ -212,7 +212,7 @@ mod test { use types::*; type BeaconChainHarness = - crate::test_utils::BeaconChainHarness>; + crate::test_utils::BeaconChainHarness>; /// Returns two different committee caches for testing. fn committee_caches() -> (Arc, Arc) { diff --git a/beacon_node/beacon_chain/src/test_utils.rs b/beacon_node/beacon_chain/src/test_utils.rs index b86c93fe8..6696e15ee 100644 --- a/beacon_node/beacon_chain/src/test_utils.rs +++ b/beacon_node/beacon_chain/src/test_utils.rs @@ -69,6 +69,7 @@ pub type BaseHarnessType = Witness, TEthSpec, THotStore, TColdStore>; pub type DiskHarnessType = BaseHarnessType, LevelDB, TSlotClock>; + pub type EphemeralHarnessType = BaseHarnessType, MemoryStore, TSlotClock>; @@ -282,6 +283,18 @@ impl Builder, S> { } } +impl Builder, TestingSlotClock> +where + E: EthSpec, + Hot: ItemStore, + Cold: ItemStore, +{ + pub fn testing_slot_clock(mut self, slot_clock: TestingSlotClock) -> Self { + self.testing_slot_clock = Some(slot_clock); + self + } +} + impl Builder, S> where E: EthSpec, diff --git a/beacon_node/beacon_chain/tests/attestation_verification.rs b/beacon_node/beacon_chain/tests/attestation_verification.rs index 6a9e60479..f2bd40bf8 100644 --- a/beacon_node/beacon_chain/tests/attestation_verification.rs +++ b/beacon_node/beacon_chain/tests/attestation_verification.rs @@ -3,7 +3,8 @@ use beacon_chain::{ attestation_verification::Error as AttnError, test_utils::{ - test_spec, AttestationStrategy, BeaconChainHarness, BlockStrategy, EphemeralHarnessType, + test_spec, AttestationStrategy, BeaconChainHarness, BlockStrategy, + EphemeralTestingSlotClockHarnessType, }, BeaconChain, BeaconChainError, BeaconChainTypes, WhenSlotSkipped, }; @@ -31,7 +32,9 @@ lazy_static! { } /// Returns a beacon chain harness. -fn get_harness(validator_count: usize) -> BeaconChainHarness> { +fn get_harness( + validator_count: usize, +) -> BeaconChainHarness> { let mut spec = test_spec::(); // A kind-of arbitrary number that ensures that _some_ validators are aggregators, but @@ -189,7 +192,7 @@ fn get_non_aggregator( } struct GossipTester { - harness: BeaconChainHarness>, + harness: BeaconChainHarness>, /* * Valid unaggregated attestation */ diff --git a/beacon_node/beacon_chain/tests/block_verification.rs b/beacon_node/beacon_chain/tests/block_verification.rs index 600e129f5..345d41c51 100644 --- a/beacon_node/beacon_chain/tests/block_verification.rs +++ b/beacon_node/beacon_chain/tests/block_verification.rs @@ -1,7 +1,7 @@ #![cfg(not(debug_assertions))] use beacon_chain::test_utils::{ - AttestationStrategy, BeaconChainHarness, BlockStrategy, EphemeralHarnessType, + AttestationStrategy, BeaconChainHarness, BlockStrategy, EphemeralTestingSlotClockHarnessType, }; use beacon_chain::{BeaconSnapshot, BlockError, ChainSegmentResult, NotifyExecutionLayer}; use fork_choice::CountUnrealized; @@ -65,7 +65,9 @@ async fn get_chain_segment() -> Vec> { segment } -fn get_harness(validator_count: usize) -> BeaconChainHarness> { +fn get_harness( + validator_count: usize, +) -> BeaconChainHarness> { let harness = BeaconChainHarness::builder(MainnetEthSpec) .default_spec() .keypairs(KEYPAIRS[0..validator_count].to_vec()) @@ -99,7 +101,7 @@ fn junk_aggregate_signature() -> AggregateSignature { fn update_proposal_signatures( snapshots: &mut [BeaconSnapshot], - harness: &BeaconChainHarness>, + harness: &BeaconChainHarness>, ) { for snapshot in snapshots { let spec = &harness.chain.spec; @@ -329,7 +331,7 @@ async fn chain_segment_non_linear_slots() { async fn assert_invalid_signature( chain_segment: &[BeaconSnapshot], - harness: &BeaconChainHarness>, + harness: &BeaconChainHarness>, block_index: usize, snapshots: &[BeaconSnapshot], item: &str, @@ -400,7 +402,7 @@ async fn assert_invalid_signature( async fn get_invalid_sigs_harness( chain_segment: &[BeaconSnapshot], -) -> BeaconChainHarness> { +) -> BeaconChainHarness> { let harness = get_harness(VALIDATOR_COUNT); harness .chain diff --git a/beacon_node/beacon_chain/tests/merge.rs b/beacon_node/beacon_chain/tests/merge.rs index 5d1b7bf15..1e0112a49 100644 --- a/beacon_node/beacon_chain/tests/merge.rs +++ b/beacon_node/beacon_chain/tests/merge.rs @@ -48,7 +48,7 @@ async fn merge_with_terminal_block_hash_override() { spec.terminal_block_hash = genesis_pow_block_hash; - let harness = BeaconChainHarness::builder(E::default(), TestingSlotClock) + let harness = BeaconChainHarness::builder(E::default()) .spec(spec) .logger(logging::test_logger()) .deterministic_keypairs(VALIDATOR_COUNT) @@ -105,7 +105,7 @@ async fn base_altair_merge_with_terminal_block_after_fork() { let mut execution_payloads = vec![]; - let harness = BeaconChainHarness::builder(E::default(), TestingSlotClock) + let harness = BeaconChainHarness::builder(E::default()) .spec(spec) .logger(logging::test_logger()) .deterministic_keypairs(VALIDATOR_COUNT) diff --git a/beacon_node/beacon_chain/tests/op_verification.rs b/beacon_node/beacon_chain/tests/op_verification.rs index 535fe080a..a7e5b90f3 100644 --- a/beacon_node/beacon_chain/tests/op_verification.rs +++ b/beacon_node/beacon_chain/tests/op_verification.rs @@ -8,6 +8,7 @@ use beacon_chain::test_utils::{ }; use lazy_static::lazy_static; use sloggers::{null::NullLoggerBuilder, Build}; +use slot_clock::TestingSlotClock; use std::sync::Arc; use store::{LevelDB, StoreConfig}; use tempfile::{tempdir, TempDir}; @@ -22,7 +23,7 @@ lazy_static! { } type E = MinimalEthSpec; -type TestHarness = BeaconChainHarness>; +type TestHarness = BeaconChainHarness>; type HotColdDB = store::HotColdDB, LevelDB>; fn get_store(db_path: &TempDir) -> Arc { diff --git a/beacon_node/beacon_chain/tests/payload_invalidation.rs b/beacon_node/beacon_chain/tests/payload_invalidation.rs index d0f81652b..b79ee960a 100644 --- a/beacon_node/beacon_chain/tests/payload_invalidation.rs +++ b/beacon_node/beacon_chain/tests/payload_invalidation.rs @@ -6,7 +6,7 @@ use beacon_chain::otb_verification_service::{ }; use beacon_chain::{ canonical_head::{CachedHead, CanonicalHead}, - test_utils::{BeaconChainHarness, EphemeralHarnessType}, + test_utils::{BeaconChainHarness, EphemeralTestingSlotClockHarnessType}, BeaconChainError, BlockError, ExecutionPayloadError, NotifyExecutionLayer, OverrideForkchoiceUpdate, StateSkipConfig, WhenSlotSkipped, INVALID_FINALIZED_MERGE_TRANSITION_BLOCK_SHUTDOWN_REASON, @@ -45,7 +45,7 @@ enum Payload { } struct InvalidPayloadRig { - harness: BeaconChainHarness>, + harness: BeaconChainHarness>, enable_attestations: bool, } @@ -116,7 +116,7 @@ impl InvalidPayloadRig { self.harness.chain.canonical_head.cached_head() } - fn canonical_head(&self) -> &CanonicalHead> { + fn canonical_head(&self) -> &CanonicalHead> { &self.harness.chain.canonical_head } diff --git a/beacon_node/beacon_chain/tests/store_tests.rs b/beacon_node/beacon_chain/tests/store_tests.rs index 945d58236..6345c9bf9 100644 --- a/beacon_node/beacon_chain/tests/store_tests.rs +++ b/beacon_node/beacon_chain/tests/store_tests.rs @@ -18,6 +18,7 @@ use lazy_static::lazy_static; use logging::test_logger; use maplit::hashset; use rand::Rng; +use slot_clock::TestingSlotClock; use state_processing::BlockReplayer; use std::collections::HashMap; use std::collections::HashSet; @@ -44,7 +45,7 @@ lazy_static! { } type E = MinimalEthSpec; -type TestHarness = BeaconChainHarness>; +type TestHarness = BeaconChainHarness>; fn get_store(db_path: &TempDir) -> Arc, LevelDB>> { get_store_with_spec(db_path, test_spec::()) @@ -67,7 +68,7 @@ fn get_harness( store: Arc, LevelDB>>, validator_count: usize, ) -> TestHarness { - let harness = BeaconChainHarness::builder(MinimalEthSpec) + let harness = TestHarness::builder(MinimalEthSpec) .default_spec() .keypairs(KEYPAIRS[0..validator_count].to_vec()) .fresh_disk_store(store) @@ -567,7 +568,7 @@ async fn delete_blocks_and_states() { let store = get_store(&db_path); let validators_keypairs = types::test_utils::generate_deterministic_keypairs(LOW_VALIDATOR_COUNT); - let harness = BeaconChainHarness::builder(MinimalEthSpec) + let harness = TestHarness::builder(MinimalEthSpec) .default_spec() .keypairs(validators_keypairs) .fresh_disk_store(store.clone()) @@ -697,7 +698,7 @@ async fn multi_epoch_fork_valid_blocks_test( let store = get_store(&db_path); let validators_keypairs = types::test_utils::generate_deterministic_keypairs(LOW_VALIDATOR_COUNT); - let harness = BeaconChainHarness::builder(MinimalEthSpec) + let harness = TestHarness::builder(MinimalEthSpec) .default_spec() .keypairs(validators_keypairs) .fresh_disk_store(store) @@ -2109,7 +2110,7 @@ async fn weak_subjectivity_sync() { // Initialise a new beacon chain from the finalized checkpoint let beacon_chain = Arc::new( - BeaconChainBuilder::new(MinimalEthSpec) + BeaconChainBuilder::>::new(MinimalEthSpec) .store(store.clone()) .custom_spec(test_spec::()) .task_executor(harness.chain.task_executor.clone()) @@ -2306,12 +2307,13 @@ async fn finalizes_after_resuming_from_db() { let original_chain = harness.chain; - let resumed_harness = BeaconChainHarness::builder(MinimalEthSpec) - .default_spec() - .keypairs(KEYPAIRS[0..validator_count].to_vec()) - .resumed_disk_store(store) - .mock_execution_layer() - .build(); + let resumed_harness = + BeaconChainHarness::>::builder(MinimalEthSpec) + .default_spec() + .keypairs(KEYPAIRS[0..validator_count].to_vec()) + .resumed_disk_store(store) + .mock_execution_layer() + .build(); assert_chains_pretty_much_the_same(&original_chain, &resumed_harness.chain); @@ -2482,7 +2484,7 @@ async fn revert_minority_fork_on_resume() { drop(harness1); let resume_store = get_store_with_spec(&db_path1, spec2.clone()); - let resumed_harness = BeaconChainHarness::builder(MinimalEthSpec) + let resumed_harness = TestHarness::builder(MinimalEthSpec) .spec(spec2) .keypairs(KEYPAIRS[0..validator_count].to_vec()) .resumed_disk_store(resume_store) diff --git a/beacon_node/beacon_chain/tests/sync_committee_verification.rs b/beacon_node/beacon_chain/tests/sync_committee_verification.rs index 239f55e7d..3f63296a8 100644 --- a/beacon_node/beacon_chain/tests/sync_committee_verification.rs +++ b/beacon_node/beacon_chain/tests/sync_committee_verification.rs @@ -1,7 +1,9 @@ #![cfg(not(debug_assertions))] use beacon_chain::sync_committee_verification::Error as SyncCommitteeError; -use beacon_chain::test_utils::{BeaconChainHarness, EphemeralHarnessType, RelativeSyncCommittee}; +use beacon_chain::test_utils::{ + BeaconChainHarness, EphemeralTestingSlotClockHarnessType, RelativeSyncCommittee, +}; use int_to_bytes::int_to_bytes32; use lazy_static::lazy_static; use safe_arith::SafeArith; @@ -23,7 +25,9 @@ lazy_static! { } /// Returns a beacon chain harness. -fn get_harness(validator_count: usize) -> BeaconChainHarness> { +fn get_harness( + validator_count: usize, +) -> BeaconChainHarness> { let mut spec = E::default_spec(); spec.altair_fork_epoch = Some(Epoch::new(0)); let harness = BeaconChainHarness::builder(MainnetEthSpec) @@ -42,7 +46,7 @@ fn get_harness(validator_count: usize) -> BeaconChainHarness>, + harness: &BeaconChainHarness>, slot: Slot, relative_sync_committee: RelativeSyncCommittee, message_index: usize, @@ -68,7 +72,7 @@ fn get_valid_sync_committee_message( } fn get_valid_sync_contribution( - harness: &BeaconChainHarness>, + harness: &BeaconChainHarness>, relative_sync_committee: RelativeSyncCommittee, ) -> (SignedContributionAndProof, usize, SecretKey) { let head_state = harness.chain.head_beacon_state_cloned(); @@ -100,7 +104,7 @@ fn get_valid_sync_contribution( /// Returns a proof and index for a validator that is **not** an aggregator for the current sync period. fn get_non_aggregator( - harness: &BeaconChainHarness>, + harness: &BeaconChainHarness>, slot: Slot, ) -> (usize, SecretKey) { let state = &harness.chain.head_snapshot().beacon_state; diff --git a/beacon_node/beacon_chain/tests/tests.rs b/beacon_node/beacon_chain/tests/tests.rs index 384fcbe5d..60c2e8698 100644 --- a/beacon_node/beacon_chain/tests/tests.rs +++ b/beacon_node/beacon_chain/tests/tests.rs @@ -3,8 +3,8 @@ use beacon_chain::{ attestation_verification::Error as AttnError, test_utils::{ - AttestationStrategy, BeaconChainHarness, BlockStrategy, EphemeralHarnessType, - OP_POOL_DB_KEY, + AttestationStrategy, BeaconChainHarness, BlockStrategy, + EphemeralTestingSlotClockHarnessType, OP_POOL_DB_KEY, }, BeaconChain, NotifyExecutionLayer, StateSkipConfig, WhenSlotSkipped, }; @@ -26,7 +26,9 @@ lazy_static! { static ref KEYPAIRS: Vec = types::test_utils::generate_deterministic_keypairs(VALIDATOR_COUNT); } -fn get_harness(validator_count: usize) -> BeaconChainHarness> { +fn get_harness( + validator_count: usize, +) -> BeaconChainHarness> { let harness = BeaconChainHarness::builder(MinimalEthSpec) .default_spec() .keypairs(KEYPAIRS[0..validator_count].to_vec()) @@ -143,7 +145,7 @@ async fn iterators() { } fn find_reorg_slot( - chain: &BeaconChain>, + chain: &BeaconChain>, new_state: &BeaconState, new_block_root: Hash256, ) -> Slot { diff --git a/beacon_node/http_api/tests/common.rs b/beacon_node/http_api/tests/common.rs index ee0273579..f3449d32d 100644 --- a/beacon_node/http_api/tests/common.rs +++ b/beacon_node/http_api/tests/common.rs @@ -1,7 +1,5 @@ use beacon_chain::{ - test_utils::{ - BeaconChainHarness, BoxedMutator, Builder as HarnessBuilder, EphemeralHarnessType, - }, + test_utils::{BeaconChainHarness, BoxedMutator, EphemeralTestingSlotClockHarnessType}, BeaconChain, BeaconChainTypes, }; use directory::DEFAULT_ROOT_DIR; @@ -39,7 +37,7 @@ pub const EXTERNAL_ADDR: &str = "/ip4/0.0.0.0/tcp/9000"; /// HTTP API tester that allows interaction with the underlying beacon chain harness. pub struct InteractiveTester { - pub harness: BeaconChainHarness>, + pub harness: BeaconChainHarness>, pub client: BeaconNodeHttpClient, pub network_rx: NetworkReceivers, _server_shutdown: oneshot::Sender<()>, diff --git a/beacon_node/http_api/tests/tests.rs b/beacon_node/http_api/tests/tests.rs index 43099c7a9..3a955ad03 100644 --- a/beacon_node/http_api/tests/tests.rs +++ b/beacon_node/http_api/tests/tests.rs @@ -1,7 +1,10 @@ use crate::common::{create_api_server, create_api_server_on_port, ApiServer}; use beacon_chain::test_utils::RelativeSyncCommittee; use beacon_chain::{ - test_utils::{AttestationStrategy, BeaconChainHarness, BlockStrategy, EphemeralHarnessType}, + test_utils::{ + AttestationStrategy, BeaconChainHarness, BlockStrategy, + EphemeralTestingSlotClockHarnessType, + }, BeaconChain, StateSkipConfig, WhenSlotSkipped, MAXIMUM_GOSSIP_CLOCK_DISPARITY, }; use environment::null_logger; @@ -57,8 +60,8 @@ const SKIPPED_SLOTS: &[u64] = &[ ]; struct ApiTester { - harness: Arc>>, - chain: Arc>>, + harness: Arc>>, + chain: Arc>>, client: BeaconNodeHttpClient, next_block: SignedBeaconBlock, reorg_block: SignedBeaconBlock, diff --git a/beacon_node/network/src/beacon_processor/tests.rs b/beacon_node/network/src/beacon_processor/tests.rs index e2b96fb47..ea5c586e9 100644 --- a/beacon_node/network/src/beacon_processor/tests.rs +++ b/beacon_node/network/src/beacon_processor/tests.rs @@ -7,7 +7,7 @@ use crate::beacon_processor::work_reprocessing_queue::{ use crate::beacon_processor::*; use crate::{service::NetworkMessage, sync::SyncMessage}; use beacon_chain::test_utils::{ - AttestationStrategy, BeaconChainHarness, BlockStrategy, EphemeralHarnessType, + AttestationStrategy, BeaconChainHarness, BlockStrategy, EphemeralTestingSlotClockHarnessType, }; use beacon_chain::{BeaconChain, MAXIMUM_GOSSIP_CLOCK_DISPARITY}; use lighthouse_network::{ @@ -28,7 +28,7 @@ use types::{ }; type E = MainnetEthSpec; -type T = EphemeralHarnessType; +type T = EphemeralTestingSlotClockHarnessType; const SLOTS_PER_EPOCH: u64 = 32; const VALIDATOR_COUNT: usize = SLOTS_PER_EPOCH as usize; diff --git a/beacon_node/operation_pool/src/lib.rs b/beacon_node/operation_pool/src/lib.rs index 4a2a9dd5b..82e287e0e 100644 --- a/beacon_node/operation_pool/src/lib.rs +++ b/beacon_node/operation_pool/src/lib.rs @@ -768,7 +768,7 @@ mod release_tests { use super::attestation::earliest_attestation_validators; use super::*; use beacon_chain::test_utils::{ - test_spec, BeaconChainHarness, EphemeralHarnessType, RelativeSyncCommittee, + test_spec, BeaconChainHarness, EphemeralTestingSlotClockHarnessType, RelativeSyncCommittee, }; use lazy_static::lazy_static; use maplit::hashset; @@ -787,8 +787,8 @@ mod release_tests { fn get_harness( validator_count: usize, spec: Option, - ) -> BeaconChainHarness> { - let harness = BeaconChainHarness::builder(E::default(), TestingSlotClock) + ) -> BeaconChainHarness> { + let harness = BeaconChainHarness::builder(E::default()) .spec_or_default(spec) .keypairs(KEYPAIRS[0..validator_count].to_vec()) .fresh_ephemeral_store() @@ -803,7 +803,10 @@ mod release_tests { /// Test state for attestation-related tests. fn attestation_test_state( num_committees: usize, - ) -> (BeaconChainHarness>, ChainSpec) { + ) -> ( + BeaconChainHarness>, + ChainSpec, + ) { let spec = test_spec::(); let num_validators = @@ -816,7 +819,10 @@ mod release_tests { /// Test state for sync contribution-related tests. async fn sync_contribution_test_state( num_committees: usize, - ) -> (BeaconChainHarness>, ChainSpec) { + ) -> ( + BeaconChainHarness>, + ChainSpec, + ) { let mut spec = E::default_spec(); spec.altair_fork_epoch = Some(Epoch::new(0)); @@ -1786,8 +1792,10 @@ mod release_tests { ); } - fn cross_fork_harness() -> (BeaconChainHarness>, ChainSpec) - { + fn cross_fork_harness() -> ( + BeaconChainHarness>, + ChainSpec, + ) { let mut spec = E::default_spec(); // Give some room to sign surround slashings. diff --git a/common/slot_clock/src/system_time_slot_clock.rs b/common/slot_clock/src/system_time_slot_clock.rs index 126634aa3..c54646fbc 100644 --- a/common/slot_clock/src/system_time_slot_clock.rs +++ b/common/slot_clock/src/system_time_slot_clock.rs @@ -67,12 +67,6 @@ impl SlotClock for SystemTimeSlotClock { } } -impl From for SystemTimeSlotClock { - fn from(clock: ManualSlotClock) -> Self { - SystemTimeSlotClock { clock } - } -} - #[cfg(test)] mod tests { use super::*; diff --git a/consensus/fork_choice/tests/tests.rs b/consensus/fork_choice/tests/tests.rs index 005bb6b8b..21eb65623 100644 --- a/consensus/fork_choice/tests/tests.rs +++ b/consensus/fork_choice/tests/tests.rs @@ -35,7 +35,7 @@ pub enum MutationDelay { /// A helper struct to make testing fork choice more ergonomic and less repetitive. struct ForkChoiceTest { - harness: BeaconChainHarness>, + harness: BeaconChainHarness>, } /// Allows us to use `unwrap` in some cases. @@ -397,7 +397,7 @@ impl ForkChoiceTest { mut comparison_func: G, ) -> Self where - F: FnMut(&mut IndexedAttestation, &BeaconChain>), + F: FnMut(&mut IndexedAttestation, &BeaconChain>), G: FnMut(Result<(), BeaconChainError>), { let head = self.harness.chain.head_snapshot();