mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Remove merge transition code (#8761)
Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
This commit is contained in:
@@ -9,8 +9,8 @@ use alloy_signer_local::PrivateKeySigner;
|
||||
use bls::PublicKeyBytes;
|
||||
use execution_layer::test_utils::DEFAULT_GAS_LIMIT;
|
||||
use execution_layer::{
|
||||
BlockProposalContentsType, BuilderParams, ChainHealth, ExecutionLayer, PayloadAttributes,
|
||||
PayloadParameters, PayloadStatus,
|
||||
BlockByNumberQuery, BlockProposalContentsType, BuilderParams, ChainHealth, ExecutionLayer,
|
||||
LATEST_TAG, PayloadAttributes, PayloadParameters, PayloadStatus,
|
||||
};
|
||||
use fixed_bytes::FixedBytesExtended;
|
||||
use fork_choice::ForkchoiceUpdateParameters;
|
||||
@@ -210,25 +210,29 @@ impl<Engine: GenericExecutionEngine> TestRig<Engine> {
|
||||
let account2 = AlloyAddress::from_slice(&hex::decode(ACCOUNT2).unwrap());
|
||||
|
||||
/*
|
||||
* Read the terminal block hash from both pairs, check it's equal.
|
||||
* Read the genesis block hash from both pairs, check it's equal.
|
||||
* Since TTD=0, the genesis block is the terminal PoW block.
|
||||
*/
|
||||
|
||||
let terminal_pow_block_hash = self
|
||||
let genesis_block = self
|
||||
.ee_a
|
||||
.execution_layer
|
||||
.get_terminal_pow_block_hash(&self.spec, timestamp_now())
|
||||
.get_block_by_number(BlockByNumberQuery::Tag(LATEST_TAG))
|
||||
.await
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
.expect("should have genesis block");
|
||||
|
||||
let terminal_pow_block_hash = genesis_block.block_hash;
|
||||
|
||||
assert_eq!(
|
||||
terminal_pow_block_hash,
|
||||
self.ee_b
|
||||
.execution_layer
|
||||
.get_terminal_pow_block_hash(&self.spec, timestamp_now())
|
||||
.get_block_by_number(BlockByNumberQuery::Tag(LATEST_TAG))
|
||||
.await
|
||||
.unwrap()
|
||||
.unwrap()
|
||||
.expect("should have genesis block")
|
||||
.block_hash
|
||||
);
|
||||
|
||||
// Submit transactions before getting payload
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use super::*;
|
||||
use beacon_chain::test_utils::test_spec;
|
||||
use state_processing::{
|
||||
BlockProcessingError, BlockSignatureStrategy, ConsensusContext, VerifyBlockRoot,
|
||||
per_block_processing, per_block_processing::errors::ExitInvalid,
|
||||
@@ -70,13 +71,13 @@ impl ExitTest {
|
||||
BlockSignatureStrategy::VerifyIndividual,
|
||||
VerifyBlockRoot::True,
|
||||
&mut ctxt,
|
||||
&E::default_spec(),
|
||||
&test_spec::<E>(),
|
||||
)
|
||||
}
|
||||
|
||||
#[cfg(all(test, not(debug_assertions)))]
|
||||
async fn run(self) -> BeaconState<E> {
|
||||
let spec = &E::default_spec();
|
||||
let spec = &test_spec::<E>();
|
||||
let expected = self.expected.clone();
|
||||
assert_eq!(STATE_EPOCH, spec.shard_committee_period);
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ async fn get_harness<E: EthSpec>(
|
||||
.default_spec()
|
||||
.keypairs(KEYPAIRS[0..validator_count].to_vec())
|
||||
.fresh_ephemeral_store()
|
||||
.mock_execution_layer()
|
||||
.build();
|
||||
let skip_to_slot = slot - SLOT_OFFSET;
|
||||
if skip_to_slot > Slot::new(0) {
|
||||
|
||||
Reference in New Issue
Block a user