use block wrapper in sync pairing (#4131)

This commit is contained in:
realbigsean
2023-03-26 19:18:54 -04:00
committed by GitHub
parent a5addf661c
commit af974dc0b8
5 changed files with 20 additions and 56 deletions

View File

@@ -1,4 +1,4 @@
use super::network_context::TempBlockWrapper;
use beacon_chain::blob_verification::BlockWrapper;
use std::{collections::VecDeque, sync::Arc};
use types::{BlobSidecar, EthSpec, SignedBeaconBlock};
@@ -29,7 +29,7 @@ impl<T: EthSpec> BlocksAndBlobsRequestInfo<T> {
}
}
pub fn into_responses(self) -> Result<Vec<TempBlockWrapper<T>>, &'static str> {
pub fn into_responses(self) -> Result<Vec<BlockWrapper<T>>, &'static str> {
let BlocksAndBlobsRequestInfo {
accumulated_blocks,
accumulated_sidecars,
@@ -53,9 +53,9 @@ impl<T: EthSpec> BlocksAndBlobsRequestInfo<T> {
}
if blob_list.is_empty() {
responses.push(TempBlockWrapper::Block(block))
responses.push(BlockWrapper::Block(block))
} else {
responses.push(TempBlockWrapper::BlockAndBlobList(block, blob_list))
responses.push(BlockWrapper::BlockAndBlobs(block, blob_list))
}
}