mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 13:58:28 +00:00
Fix conflicts rebasing eip4844
This commit is contained in:
@@ -6,7 +6,7 @@ use beacon_chain::{
|
||||
attestation_verification::{
|
||||
obtain_indexed_attestation_and_committees_per_slot, VerifiedAttestation,
|
||||
},
|
||||
test_utils::{BeaconChainHarness, EphemeralHarnessType},
|
||||
test_utils::{BeaconChainHarness, EphemeralTestingSlotClockHarnessType},
|
||||
BeaconChainTypes, CachedHead, CountUnrealized, NotifyExecutionLayer,
|
||||
};
|
||||
use execution_layer::{json_structures::JsonPayloadStatusV1Status, PayloadStatusV1};
|
||||
@@ -286,7 +286,7 @@ impl<E: EthSpec> Case for ForkChoiceTest<E> {
|
||||
|
||||
/// A testing rig used to execute a test case.
|
||||
struct Tester<E: EthSpec> {
|
||||
harness: BeaconChainHarness<EphemeralHarnessType<E>>,
|
||||
harness: BeaconChainHarness<EphemeralTestingSlotClockHarnessType<E>>,
|
||||
spec: ChainSpec,
|
||||
}
|
||||
|
||||
@@ -306,14 +306,15 @@ impl<E: EthSpec> Tester<E> {
|
||||
));
|
||||
}
|
||||
|
||||
let harness = BeaconChainHarness::builder(E::default())
|
||||
.spec(spec.clone())
|
||||
.keypairs(vec![])
|
||||
.genesis_state_ephemeral_store(case.anchor_state.clone())
|
||||
.mock_execution_layer()
|
||||
.recalculate_fork_times_with_genesis(0)
|
||||
.mock_execution_layer_all_payloads_valid()
|
||||
.build();
|
||||
let harness =
|
||||
BeaconChainHarness::<EphemeralTestingSlotClockHarnessType<E>>::builder(E::default())
|
||||
.spec(spec.clone())
|
||||
.keypairs(vec![])
|
||||
.genesis_state_ephemeral_store(case.anchor_state.clone())
|
||||
.mock_execution_layer()
|
||||
.recalculate_fork_times_with_genesis(0)
|
||||
.mock_execution_layer_all_payloads_valid()
|
||||
.build();
|
||||
|
||||
if harness.chain.genesis_block_root != case.anchor_block.canonical_root() {
|
||||
// This check will need to be removed if/when the fork-choice tests use a non-genesis
|
||||
@@ -469,11 +470,12 @@ impl<E: EthSpec> Tester<E> {
|
||||
.map_err(|e| {
|
||||
Error::InternalError(format!("attestation indexing failed with {:?}", e))
|
||||
})?;
|
||||
let verified_attestation: ManuallyVerifiedAttestation<EphemeralHarnessType<E>> =
|
||||
ManuallyVerifiedAttestation {
|
||||
attestation,
|
||||
indexed_attestation,
|
||||
};
|
||||
let verified_attestation: ManuallyVerifiedAttestation<
|
||||
EphemeralTestingSlotClockHarnessType<E>,
|
||||
> = ManuallyVerifiedAttestation {
|
||||
attestation,
|
||||
indexed_attestation,
|
||||
};
|
||||
|
||||
self.harness
|
||||
.chain
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use super::*;
|
||||
use beacon_chain::test_utils::{BeaconChainHarness, EphemeralHarnessType};
|
||||
use beacon_chain::test_utils::{BeaconChainHarness, EphemeralTestingSlotClockHarnessType};
|
||||
use state_processing::{
|
||||
per_block_processing, per_block_processing::errors::ExitInvalid, BlockProcessingError,
|
||||
BlockSignatureStrategy, ConsensusContext, VerifyBlockRoot,
|
||||
@@ -18,8 +18,12 @@ struct ExitTest {
|
||||
#[allow(clippy::type_complexity)]
|
||||
state_modifier: Box<dyn FnOnce(&mut BeaconState<E>)>,
|
||||
#[allow(clippy::type_complexity)]
|
||||
block_modifier:
|
||||
Box<dyn FnOnce(&BeaconChainHarness<EphemeralHarnessType<E>>, &mut BeaconBlock<E>)>,
|
||||
block_modifier: Box<
|
||||
dyn FnOnce(
|
||||
&BeaconChainHarness<EphemeralTestingSlotClockHarnessType<E>>,
|
||||
&mut BeaconBlock<E>,
|
||||
),
|
||||
>,
|
||||
#[allow(dead_code)]
|
||||
expected: Result<(), BlockProcessingError>,
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
mod macros;
|
||||
mod exit;
|
||||
|
||||
use beacon_chain::test_utils::{BeaconChainHarness, EphemeralHarnessType};
|
||||
use beacon_chain::test_utils::{BeaconChainHarness, EphemeralTestingSlotClockHarnessType};
|
||||
use lazy_static::lazy_static;
|
||||
use ssz::Encode;
|
||||
use std::env;
|
||||
@@ -53,7 +53,7 @@ lazy_static! {
|
||||
async fn get_harness<E: EthSpec>(
|
||||
slot: Slot,
|
||||
validator_count: usize,
|
||||
) -> BeaconChainHarness<EphemeralHarnessType<E>> {
|
||||
) -> BeaconChainHarness<EphemeralTestingSlotClockHarnessType<E>> {
|
||||
let harness = BeaconChainHarness::builder(E::default())
|
||||
.default_spec()
|
||||
.keypairs(KEYPAIRS[0..validator_count].to_vec())
|
||||
|
||||
Reference in New Issue
Block a user