mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-30 19:23:50 +00:00
Fixes after rebasing eip4844
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
#![cfg(not(debug_assertions))]
|
||||
|
||||
use beacon_chain::test_utils::{AttestationStrategy, BeaconChainHarness, BlockStrategy};
|
||||
use beacon_chain::{
|
||||
blob_verification::{BlockWrapper, IntoAvailableBlock},
|
||||
test_utils::{AttestationStrategy, BeaconChainHarness, BlockStrategy},
|
||||
};
|
||||
use beacon_chain::{StateSkipConfig, WhenSlotSkipped};
|
||||
use lazy_static::lazy_static;
|
||||
use std::sync::Arc;
|
||||
@@ -131,6 +134,8 @@ async fn produces_attestations() {
|
||||
assert_eq!(data.target.epoch, state.current_epoch(), "bad target epoch");
|
||||
assert_eq!(data.target.root, target_root, "bad target root");
|
||||
|
||||
let block_wrapper: BlockWrapper<MainnetEthSpec> = Arc::new(block.clone()).into();
|
||||
|
||||
let early_attestation = {
|
||||
let proto_block = chain
|
||||
.canonical_head
|
||||
@@ -141,7 +146,9 @@ async fn produces_attestations() {
|
||||
.early_attester_cache
|
||||
.add_head_block(
|
||||
block_root,
|
||||
Arc::new(block.clone()).into(),
|
||||
block_wrapper
|
||||
.into_available_block(block_root, chain)
|
||||
.expect("should wrap into available block"),
|
||||
proto_block,
|
||||
&state,
|
||||
&chain.spec,
|
||||
@@ -192,12 +199,18 @@ async fn early_attester_cache_old_request() {
|
||||
.get_block(&head.beacon_block_root)
|
||||
.unwrap();
|
||||
|
||||
let block: BlockWrapper<MainnetEthSpec> = head.beacon_block.clone().into();
|
||||
|
||||
let chain = &harness.chain;
|
||||
harness
|
||||
.chain
|
||||
.early_attester_cache
|
||||
.add_head_block(
|
||||
head.beacon_block_root,
|
||||
head.beacon_block.clone().into(),
|
||||
block
|
||||
.clone()
|
||||
.into_available_block(head.beacon_block_root, &chain)
|
||||
.expect("should wrap into available block"),
|
||||
head_proto_block,
|
||||
&head.beacon_state,
|
||||
&harness.chain.spec,
|
||||
|
||||
Reference in New Issue
Block a user