mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-18 20:32:45 +00:00
First pass
This commit is contained in:
@@ -1991,7 +1991,7 @@ where
|
||||
let (block, blob_items) = block_contents;
|
||||
|
||||
let sidecars = blob_items
|
||||
.map(|(proofs, blobs)| BlobSidecar::build_sidecars(blobs, &block, proofs))
|
||||
.map(|(proofs, blobs)| BlobSidecar::build_sidecars(blobs, &block, proofs, &self.spec))
|
||||
.transpose()
|
||||
.unwrap();
|
||||
let block_hash: SignedBeaconBlockHash = self
|
||||
@@ -2017,7 +2017,7 @@ where
|
||||
let (block, blob_items) = block_contents;
|
||||
|
||||
let sidecars = blob_items
|
||||
.map(|(proofs, blobs)| BlobSidecar::build_sidecars(blobs, &block, proofs))
|
||||
.map(|(proofs, blobs)| BlobSidecar::build_sidecars(blobs, &block, proofs, &self.spec))
|
||||
.transpose()
|
||||
.unwrap();
|
||||
let block_root = block.canonical_root();
|
||||
@@ -2636,7 +2636,8 @@ pub fn generate_rand_block_and_blobs<E: EthSpec>(
|
||||
// Get either zero blobs or a random number of blobs between 1 and Max Blobs.
|
||||
let payload: &mut FullPayloadDeneb<E> = &mut message.body.execution_payload;
|
||||
let num_blobs = match num_blobs {
|
||||
NumBlobs::Random => rng.gen_range(1..=E::max_blobs_per_block()),
|
||||
// TODO(pawan): thread the chainspec value here
|
||||
NumBlobs::Random => rng.gen_range(1..=6),
|
||||
NumBlobs::Number(n) => n,
|
||||
NumBlobs::None => 0,
|
||||
};
|
||||
@@ -2656,7 +2657,8 @@ pub fn generate_rand_block_and_blobs<E: EthSpec>(
|
||||
// Get either zero blobs or a random number of blobs between 1 and Max Blobs.
|
||||
let payload: &mut FullPayloadElectra<E> = &mut message.body.execution_payload;
|
||||
let num_blobs = match num_blobs {
|
||||
NumBlobs::Random => rng.gen_range(1..=E::max_blobs_per_block()),
|
||||
// TODO(pawan): thread the chainspec value here
|
||||
NumBlobs::Random => rng.gen_range(1..=6),
|
||||
NumBlobs::Number(n) => n,
|
||||
NumBlobs::None => 0,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user