Skip to content

Commit 8f07a96

Browse files
committed
Fix failing tests.
1 parent 1458394 commit 8f07a96

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

beacon_node/beacon_chain/src/test_utils.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -450,14 +450,14 @@ where
450450
}
451451

452452
pub fn mock_execution_layer(self) -> Self {
453-
self.mock_execution_layer_with_config()
453+
self.mock_execution_layer_with_config(None)
454454
}
455455

456-
pub fn mock_execution_layer_with_config(mut self) -> Self {
456+
pub fn mock_execution_layer_with_config(mut self, builder_threshold: Option<u128>) -> Self {
457457
let mock = mock_execution_layer_from_parts::<E>(
458458
self.spec.as_ref().expect("cannot build without spec"),
459459
self.runtime.task_executor.clone(),
460-
None,
460+
builder_threshold,
461461
);
462462
self.execution_layer = Some(mock.el.clone());
463463
self.mock_execution_layer = Some(mock);

beacon_node/http_api/tests/tests.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ struct ApiTester {
7878
struct ApiTesterConfig {
7979
spec: ChainSpec,
8080
retain_historic_states: bool,
81+
builder_threshold: Option<u128>,
8182
}
8283

8384
impl Default for ApiTesterConfig {
@@ -87,6 +88,7 @@ impl Default for ApiTesterConfig {
8788
Self {
8889
spec,
8990
retain_historic_states: false,
91+
builder_threshold: None,
9092
}
9193
}
9294
}
@@ -128,7 +130,7 @@ impl ApiTester {
128130
.logger(logging::test_logger())
129131
.deterministic_keypairs(VALIDATOR_COUNT)
130132
.fresh_ephemeral_store()
131-
.mock_execution_layer_with_config()
133+
.mock_execution_layer_with_config(config.builder_threshold)
132134
.build();
133135

134136
harness
@@ -403,6 +405,7 @@ impl ApiTester {
403405

404406
pub async fn new_mev_tester_no_builder_threshold() -> Self {
405407
let mut config = ApiTesterConfig {
408+
builder_threshold: Some(0),
406409
retain_historic_states: false,
407410
spec: E::default_spec(),
408411
};
@@ -5350,6 +5353,7 @@ async fn builder_payload_chosen_by_profit() {
53505353
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
53515354
async fn builder_works_post_capella() {
53525355
let mut config = ApiTesterConfig {
5356+
builder_threshold: Some(0),
53535357
retain_historic_states: false,
53545358
spec: E::default_spec(),
53555359
};
@@ -5370,6 +5374,7 @@ async fn builder_works_post_capella() {
53705374
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
53715375
async fn builder_works_post_deneb() {
53725376
let mut config = ApiTesterConfig {
5377+
builder_threshold: Some(0),
53735378
retain_historic_states: false,
53745379
spec: E::default_spec(),
53755380
};

0 commit comments

Comments
 (0)