mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Merge remote-tracking branch 'origin/unstable' into capella-update
This commit is contained in:
@@ -7,8 +7,9 @@ use beacon_chain::otb_verification_service::{
|
||||
use beacon_chain::{
|
||||
canonical_head::{CachedHead, CanonicalHead},
|
||||
test_utils::{BeaconChainHarness, EphemeralHarnessType},
|
||||
BeaconChainError, BlockError, ExecutionPayloadError, NotifyExecutionLayer, StateSkipConfig,
|
||||
WhenSlotSkipped, INVALID_FINALIZED_MERGE_TRANSITION_BLOCK_SHUTDOWN_REASON,
|
||||
BeaconChainError, BlockError, ExecutionPayloadError, NotifyExecutionLayer,
|
||||
OverrideForkchoiceUpdate, StateSkipConfig, WhenSlotSkipped,
|
||||
INVALID_FINALIZED_MERGE_TRANSITION_BLOCK_SHUTDOWN_REASON,
|
||||
INVALID_JUSTIFIED_PAYLOAD_SHUTDOWN_REASON,
|
||||
};
|
||||
use execution_layer::{
|
||||
@@ -19,6 +20,7 @@ use execution_layer::{
|
||||
use fork_choice::{
|
||||
CountUnrealized, Error as ForkChoiceError, InvalidationOperation, PayloadVerificationStatus,
|
||||
};
|
||||
use logging::test_logger;
|
||||
use proto_array::{Error as ProtoArrayError, ExecutionStatus};
|
||||
use slot_clock::SlotClock;
|
||||
use std::collections::HashMap;
|
||||
@@ -59,6 +61,7 @@ impl InvalidPayloadRig {
|
||||
|
||||
let harness = BeaconChainHarness::builder(MainnetEthSpec)
|
||||
.spec(spec)
|
||||
.logger(test_logger())
|
||||
.deterministic_keypairs(VALIDATOR_COUNT)
|
||||
.mock_execution_layer()
|
||||
.fresh_ephemeral_store()
|
||||
@@ -386,7 +389,7 @@ impl InvalidPayloadRig {
|
||||
.fork_choice_write_lock()
|
||||
.get_head(self.harness.chain.slot().unwrap(), &self.harness.chain.spec)
|
||||
{
|
||||
Err(ForkChoiceError::ProtoArrayError(e)) if e.contains(s) => (),
|
||||
Err(ForkChoiceError::ProtoArrayStringError(e)) if e.contains(s) => (),
|
||||
other => panic!("expected {} error, got {:?}", s, other),
|
||||
};
|
||||
}
|
||||
@@ -981,6 +984,10 @@ async fn payload_preparation() {
|
||||
)
|
||||
.await;
|
||||
|
||||
rig.harness.advance_to_slot_lookahead(
|
||||
next_slot,
|
||||
rig.harness.chain.config.prepare_payload_lookahead,
|
||||
);
|
||||
rig.harness
|
||||
.chain
|
||||
.prepare_beacon_proposer(rig.harness.chain.slot().unwrap())
|
||||
@@ -1059,7 +1066,7 @@ async fn invalid_parent() {
|
||||
&rig.harness.chain.spec,
|
||||
CountUnrealized::True,
|
||||
),
|
||||
Err(ForkChoiceError::ProtoArrayError(message))
|
||||
Err(ForkChoiceError::ProtoArrayStringError(message))
|
||||
if message.contains(&format!(
|
||||
"{:?}",
|
||||
ProtoArrayError::ParentExecutionStatusIsInvalid {
|
||||
@@ -1126,7 +1133,11 @@ async fn payload_preparation_before_transition_block() {
|
||||
.get_forkchoice_update_parameters();
|
||||
rig.harness
|
||||
.chain
|
||||
.update_execution_engine_forkchoice(current_slot, forkchoice_update_params)
|
||||
.update_execution_engine_forkchoice(
|
||||
current_slot,
|
||||
forkchoice_update_params,
|
||||
OverrideForkchoiceUpdate::Yes,
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user