mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
use block wrapper in sync pairing (#4131)
This commit is contained in:
@@ -4,7 +4,7 @@ use beacon_chain::blob_verification::{AsBlock, BlockWrapper};
|
||||
use beacon_chain::validator_monitor::{get_block_delay_ms, timestamp_now};
|
||||
use beacon_chain::{AvailabilityProcessingStatus, NotifyExecutionLayer};
|
||||
use beacon_chain::{BeaconChain, BeaconChainTypes, BlockError, CountUnrealized};
|
||||
use eth2::types::{SignedBlockContents, VariableList};
|
||||
use eth2::types::SignedBlockContents;
|
||||
use execution_layer::ProvenancedPayload;
|
||||
use lighthouse_network::PubsubMessage;
|
||||
use network::NetworkMessage;
|
||||
@@ -77,10 +77,7 @@ pub async fn publish_block<T: BeaconChainTypes>(
|
||||
PubsubMessage::BlobSidecar(Box::new((blob_index as u64, blob))),
|
||||
)?;
|
||||
}
|
||||
let blobs_vec = signed_blobs.into_iter().map(|blob| blob.message).collect();
|
||||
let blobs = VariableList::new(blobs_vec).map_err(|e| {
|
||||
warp_utils::reject::custom_server_error(format!("Invalid blobs length: {e:?}"))
|
||||
})?;
|
||||
let blobs = signed_blobs.into_iter().map(|blob| blob.message).collect();
|
||||
BlockWrapper::BlockAndBlobs(block, blobs)
|
||||
} else {
|
||||
block.into()
|
||||
|
||||
Reference in New Issue
Block a user