File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
execution_layer/src/test_utils Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,10 @@ fn update_blob_signed_header<E: EthSpec>(
206206 signed_block : & SignedBeaconBlock < E > ,
207207 blobs : & mut BlobSidecarList < E > ,
208208) {
209+ // Required to prevent as_mut_slice being called on an uninitialized list. Yuck.
210+ if blobs. is_empty ( ) {
211+ return ;
212+ }
209213 for old_blob_sidecar in blobs. as_mut_slice ( ) . unwrap ( ) {
210214 let new_blob = Arc :: new ( BlobSidecar :: < E > {
211215 index : old_blob_sidecar. index ,
Original file line number Diff line number Diff line change @@ -672,7 +672,7 @@ impl<E: EthSpec> ExecutionBlockGenerator<E> {
672672 // get random number between 0 and Max Blobs
673673 let mut rng = self . rng . lock ( ) ;
674674 // TODO(pawan): thread the chainspec value here somehow
675- let num_blobs = rng. gen :: < usize > ( ) % 6 ;
675+ let num_blobs = rng. gen :: < usize > ( ) % ( 6 + 1 ) ;
676676 let ( bundle, transactions) = generate_blobs ( num_blobs) ?;
677677 for tx in Vec :: from ( transactions) {
678678 execution_payload
You can’t perform that action at this time.
0 commit comments