fixup! Debug tests

This commit is contained in:
Emilia Hane
2023-01-22 01:27:59 +01:00
parent 7220f35ff6
commit 16cb9cfca2
5 changed files with 54 additions and 62 deletions

View File

@@ -282,10 +282,13 @@ impl<T: BeaconChainTypes> Worker<T> {
count_unrealized: CountUnrealized,
notify_execution_layer: NotifyExecutionLayer,
) -> (usize, Result<(), ChainSegmentFailed>) {
let blocks: Vec<_> = downloaded_blocks.cloned().collect();
let blocks: Vec<_> = downloaded_blocks
.cloned()
.map(|block| block.into())
.collect();
match self
.chain
.process_chain_segment(blocks.into(), count_unrealized, notify_execution_layer)
.process_chain_segment(blocks, count_unrealized, notify_execution_layer)
.await
{
ChainSegmentResult::Successful { imported_blocks } => {

View File

@@ -534,7 +534,7 @@ impl<T: BeaconChainTypes> SyncNetworkContext<T> {
/// Check whether a batch for this epoch (and only this epoch) should request just blocks or
/// blocks and blobs.
pub fn batch_type(&self, epoch: types::Epoch) -> ByRangeRequestType {
pub fn batch_type(&self, _epoch: types::Epoch) -> ByRangeRequestType {
const _: () = assert!(
super::backfill_sync::BACKFILL_EPOCHS_PER_BATCH == 1
&& super::range_sync::EPOCHS_PER_BATCH == 1,
@@ -548,7 +548,7 @@ impl<T: BeaconChainTypes> SyncNetworkContext<T> {
#[cfg(not(test))]
{
if let Some(data_availability_boundary) = self.chain.data_availability_boundary() {
if epoch >= data_availability_boundary {
if _epoch >= data_availability_boundary {
ByRangeRequestType::BlocksAndBlobs
} else {
ByRangeRequestType::Blocks

View File

@@ -602,7 +602,7 @@ mod tests {
)
.unwrap();
// Initialise a new beacon chain from the finalized checkpoint
// Initialise a new beacon chain
let chain = Arc::new(
BeaconChainBuilder::new(E)
.custom_spec(test_spec::<E>())