mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-18 20:32:45 +00:00
Event-based block lookup tests (#5534)
* WIP * Initial working version of new sync tests. * Remove sync traits and fix lints. * Reduce internal method visibility and make test method instead. Remove extra beacon chain harness instance created in tests. * Improve `SyncTester` api. * Fix lint. * Test example * Lookup tests using rig * Tests should interface with events only * lint * Skip deneb test pre-deneb * Add more assertions * Remove logging changes * Address @jimmygchen comments * Merge branch 'unstable' of https://github.com/sigp/lighthouse into bn-p2p-tests * remove unused assertions * fix lint
This commit is contained in:
@@ -2498,6 +2498,7 @@ pub fn build_log(level: slog::Level, enabled: bool) -> Logger {
|
||||
|
||||
pub enum NumBlobs {
|
||||
Random,
|
||||
Number(usize),
|
||||
None,
|
||||
}
|
||||
|
||||
@@ -2518,6 +2519,7 @@ pub fn generate_rand_block_and_blobs<E: EthSpec>(
|
||||
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()),
|
||||
NumBlobs::Number(n) => n,
|
||||
NumBlobs::None => 0,
|
||||
};
|
||||
let (bundle, transactions) =
|
||||
@@ -2537,6 +2539,7 @@ pub fn generate_rand_block_and_blobs<E: EthSpec>(
|
||||
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()),
|
||||
NumBlobs::Number(n) => n,
|
||||
NumBlobs::None => 0,
|
||||
};
|
||||
let (bundle, transactions) =
|
||||
|
||||
Reference in New Issue
Block a user