Fix small bug in test utils (#4570)

This commit is contained in:
ethDreamer 2023-08-07 10:49:52 -05:00 committed by GitHub
parent a36e34eec4
commit c8ea3e1c86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -583,7 +583,7 @@ impl<T: EthSpec> ExecutionBlockGenerator<T> {
ForkName::Base | ForkName::Altair | ForkName::Merge | ForkName::Capella => {} ForkName::Base | ForkName::Altair | ForkName::Merge | ForkName::Capella => {}
ForkName::Deneb => { ForkName::Deneb => {
// get random number between 0 and Max Blobs // get random number between 0 and Max Blobs
let num_blobs = rand::random::<usize>() % T::max_blobs_per_block(); let num_blobs = rand::random::<usize>() % (T::max_blobs_per_block() + 1);
let kzg = self.kzg.as_ref().ok_or("kzg not initialized")?; let kzg = self.kzg.as_ref().ok_or("kzg not initialized")?;
let (bundle, transactions) = generate_random_blobs(num_blobs, kzg)?; let (bundle, transactions) = generate_random_blobs(num_blobs, kzg)?;
for tx in Vec::from(transactions) { for tx in Vec::from(transactions) {