mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 12:47:05 +00:00
fix test runs
This commit is contained in:
@@ -878,10 +878,7 @@ impl<E: EthSpec> AvailableBlock<E> {
|
||||
match &block_data {
|
||||
AvailableBlockData::NoData => {
|
||||
// For Gloas, DA is checked for the PayloadEnvelope, not for the block.
|
||||
if block.fork_name(&spec).map_err(|_| {
|
||||
AvailabilityCheckError::Unexpected("Unexpected fork mismatch".to_string())
|
||||
})? < ForkName::Gloas
|
||||
{
|
||||
if block.fork_name_unchecked() < ForkName::Gloas {
|
||||
if columns_required {
|
||||
return Err(AvailabilityCheckError::MissingCustodyColumns);
|
||||
} else if blobs_required {
|
||||
|
||||
@@ -549,12 +549,18 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn no_blobs_into_responses() {
|
||||
let spec = Arc::new(test_spec::<E>());
|
||||
|
||||
let mut rng = XorShiftRng::from_seed([42; 16]);
|
||||
let blocks = (0..4)
|
||||
.map(|_| {
|
||||
generate_rand_block_and_blobs::<E>(ForkName::Base, NumBlobs::None, &mut rng)
|
||||
.0
|
||||
.into()
|
||||
generate_rand_block_and_blobs::<E>(
|
||||
spec.fork_name_at_epoch(Epoch::new(0)),
|
||||
NumBlobs::None,
|
||||
&mut rng,
|
||||
)
|
||||
.0
|
||||
.into()
|
||||
})
|
||||
.collect::<Vec<Arc<SignedBeaconBlock<E>>>>();
|
||||
|
||||
@@ -565,7 +571,6 @@ mod tests {
|
||||
// Send blocks and complete terminate response
|
||||
info.add_blocks(blocks_req_id, blocks).unwrap();
|
||||
|
||||
let spec = Arc::new(test_spec::<E>());
|
||||
let da_checker = Arc::new(test_da_checker(spec.clone(), NodeCustodyType::Fullnode));
|
||||
|
||||
// Assert response is finished and RpcBlocks can be constructed
|
||||
|
||||
Reference in New Issue
Block a user