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>(
206
206
signed_block : & SignedBeaconBlock < E > ,
207
207
blobs : & mut BlobSidecarList < E > ,
208
208
) {
209
+ // Required to prevent as_mut_slice being called on an uninitialized list. Yuck.
210
+ if blobs. is_empty ( ) {
211
+ return ;
212
+ }
209
213
for old_blob_sidecar in blobs. as_mut_slice ( ) . unwrap ( ) {
210
214
let new_blob = Arc :: new ( BlobSidecar :: < E > {
211
215
index : old_blob_sidecar. index ,
Original file line number Diff line number Diff line change @@ -672,7 +672,7 @@ impl<E: EthSpec> ExecutionBlockGenerator<E> {
672
672
// get random number between 0 and Max Blobs
673
673
let mut rng = self . rng . lock ( ) ;
674
674
// 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 ) ;
676
676
let ( bundle, transactions) = generate_blobs ( num_blobs) ?;
677
677
for tx in Vec :: from ( transactions) {
678
678
execution_payload
You can’t perform that action at this time.
0 commit comments