Initial commit

This commit is contained in:
Pawan Dhananjay
2023-03-14 19:47:06 +05:30
parent 13b54f7879
commit 761df83597
4 changed files with 99 additions and 40 deletions

View File

@@ -985,7 +985,7 @@ impl<T: BeaconChainTypes> Worker<T> {
)
.await
{
Ok(block_root) => {
Ok(BlockProcessingResult::Verified(block_root)) => {
metrics::inc_counter(&metrics::BEACON_PROCESSOR_GOSSIP_BLOCK_IMPORTED_TOTAL);
if reprocess_tx
@@ -1012,6 +1012,9 @@ impl<T: BeaconChainTypes> Worker<T> {
self.chain.recompute_head_at_current_slot().await;
}
Ok(BlockProcessingResult::AvailabilityPending(executed_block)) => {
// cache in blob cache and make rpc request for blob
}
Err(BlockError::ParentUnknown(block)) => {
// Inform the sync manager to find parents for this block
// This should not occur. It should be checked by `should_forward_block`

View File

@@ -91,7 +91,7 @@ impl<T: BeaconChainTypes> Worker<T> {
.map_err(BlockError::BlobValidation);
let result = match available_block {
Ok(block) => {
Ok(BlockProcessingResult::Verified(block)) => {
self.chain
.process_block(
block_root,
@@ -101,6 +101,10 @@ impl<T: BeaconChainTypes> Worker<T> {
)
.await
}
Ok(BlockProcessingResult::AvailabilityPending(executed_block)) => {
// Shouldn't happen as sync should only send blocks for processing
// after sending blocks into the availability cache.
}
Err(e) => Err(e),
};