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