mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 20:57:10 +00:00
add payload stuff
This commit is contained in:
@@ -3799,14 +3799,18 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
}
|
||||
}
|
||||
AvailabilityOutcome::Payload(availability) => match availability {
|
||||
PayloadAvailability::Available(available_payload_data) => {
|
||||
PayloadAvailability::Available(available_envelope) => {
|
||||
// TODO(gloas) execution publish_fn
|
||||
// publish_fn()?;
|
||||
|
||||
// Payload data is fully available
|
||||
let (block_root, data_columns) = *available_payload_data;
|
||||
self.import_available_payload_data(block_root, data_columns)
|
||||
// Payload envelope is fully available
|
||||
let res = self
|
||||
.import_available_execution_payload_envelope(available_envelope)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
// TODO(gloas) unwrap
|
||||
Ok(res)
|
||||
}
|
||||
PayloadAvailability::MissingComponents(block_root) => Ok(
|
||||
AvailabilityProcessingStatus::MissingComponents(slot, block_root),
|
||||
@@ -3815,17 +3819,6 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
}
|
||||
}
|
||||
|
||||
#[instrument(skip_all)]
|
||||
pub async fn import_available_payload_data(
|
||||
self: &Arc<Self>,
|
||||
block_root: Hash256,
|
||||
_data_columns: Vec<Arc<DataColumnSidecar<T::EthSpec>>>,
|
||||
) -> Result<AvailabilityProcessingStatus, BlockError> {
|
||||
// TODO(gloas) this is just a stub implementation
|
||||
// this function should mark payload data as available somehow
|
||||
Ok(AvailabilityProcessingStatus::Imported(block_root))
|
||||
}
|
||||
|
||||
#[instrument(skip_all)]
|
||||
pub async fn import_available_block(
|
||||
self: &Arc<Self>,
|
||||
|
||||
Reference in New Issue
Block a user