mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-18 22:49:34 +00:00
Fix tests
This commit is contained in:
@@ -176,8 +176,8 @@ where
|
||||
.collect::<Vec<_>>(),
|
||||
Some(DataSidecars::Blobs(_)) | None => vec![],
|
||||
};
|
||||
let envelope = execution_envelope
|
||||
.map(|envelope| Box::new(AvailableEnvelope::new(envelope, columns)));
|
||||
let envelope =
|
||||
execution_envelope.map(|envelope| Box::new(AvailableEnvelope::new(envelope, columns)));
|
||||
return RangeSyncBlock::new_gloas(block, envelope).unwrap();
|
||||
}
|
||||
|
||||
@@ -664,14 +664,14 @@ async fn assert_invalid_signature(
|
||||
|
||||
let process_res = harness
|
||||
.chain
|
||||
.process_block(
|
||||
snapshots[block_index].beacon_block.canonical_root(),
|
||||
build_range_sync_block(
|
||||
snapshots[block_index].beacon_block.clone(),
|
||||
snapshots[block_index].execution_envelope.clone(),
|
||||
&chain_segment_blobs[block_index],
|
||||
harness.chain.clone(),
|
||||
),
|
||||
.process_block(
|
||||
snapshots[block_index].beacon_block.canonical_root(),
|
||||
build_range_sync_block(
|
||||
snapshots[block_index].beacon_block.clone(),
|
||||
snapshots[block_index].execution_envelope.clone(),
|
||||
&chain_segment_blobs[block_index],
|
||||
harness.chain.clone(),
|
||||
),
|
||||
NotifyExecutionLayer::Yes,
|
||||
BlockImportSource::Lookup,
|
||||
|| Ok(()),
|
||||
@@ -2232,11 +2232,8 @@ async fn import_execution_pending_block<T: BeaconChainTypes>(
|
||||
}
|
||||
}
|
||||
|
||||
async fn make_gloas_range_sync_block_inputs(
|
||||
) -> Option<(
|
||||
Arc<SignedBeaconBlock<E>>,
|
||||
SignedExecutionPayloadEnvelope<E>,
|
||||
)> {
|
||||
async fn make_gloas_range_sync_block_inputs()
|
||||
-> Option<(Arc<SignedBeaconBlock<E>>, SignedExecutionPayloadEnvelope<E>)> {
|
||||
let spec = test_spec::<E>();
|
||||
if !spec.fork_name_at_slot::<E>(Slot::new(1)).gloas_enabled() {
|
||||
return None;
|
||||
|
||||
@@ -533,7 +533,8 @@ mod tests {
|
||||
use super::*;
|
||||
use beacon_chain::{
|
||||
PayloadVerificationStatus,
|
||||
block_verification_types::{AvailableBlockData, RangeSyncBlock},
|
||||
block_verification_types::AvailableBlockData,
|
||||
data_availability_checker::AvailableBlock,
|
||||
test_utils::{
|
||||
BeaconChainHarness, EphemeralHarnessType, fork_name_from_env,
|
||||
generate_data_column_sidecars_from_block,
|
||||
@@ -611,16 +612,13 @@ mod tests {
|
||||
"precondition: {fork_name:?} test block must produce data columns"
|
||||
);
|
||||
|
||||
let available_block = RangeSyncBlock::new(
|
||||
let available_block = AvailableBlock::new(
|
||||
block.clone(),
|
||||
AvailableBlockData::new_with_data_columns(data_columns),
|
||||
&chain.data_availability_checker,
|
||||
chain.spec.clone(),
|
||||
)
|
||||
.unwrap()
|
||||
.into_available_block(&chain.data_availability_checker, chain.spec.clone())
|
||||
.unwrap()
|
||||
.0;
|
||||
.unwrap();
|
||||
|
||||
let current_slot = harness.get_current_slot();
|
||||
let cached_head = chain.canonical_head.cached_head();
|
||||
|
||||
Reference in New Issue
Block a user