Skip to content

Commit

Permalink
Try fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsproul committed Jan 6, 2025
1 parent 88bedf0 commit 063b79c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions beacon_node/beacon_chain/tests/block_verification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ fn update_blob_signed_header<E: EthSpec>(
signed_block: &SignedBeaconBlock<E>,
blobs: &mut BlobSidecarList<E>,
) {
// Required to prevent as_mut_slice being called on an uninitialized list. Yuck.
if blobs.is_empty() {
return;
}
for old_blob_sidecar in blobs.as_mut_slice().unwrap() {
let new_blob = Arc::new(BlobSidecar::<E> {
index: old_blob_sidecar.index,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ impl<E: EthSpec> ExecutionBlockGenerator<E> {
// get random number between 0 and Max Blobs
let mut rng = self.rng.lock();
// TODO(pawan): thread the chainspec value here somehow
let num_blobs = rng.gen::<usize>() % 6;
let num_blobs = rng.gen::<usize>() % (6 + 1);
let (bundle, transactions) = generate_blobs(num_blobs)?;
for tx in Vec::from(transactions) {
execution_payload
Expand Down

0 comments on commit 063b79c

Please sign in to comment.