mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-22 07:18:25 +00:00
Add a flag to always use payloads from builders (#4052)
## Issue Addressed #4040 ## Proposed Changes - Add the `always_prefer_builder_payload` field to `Config` in `beacon_node/client/src/config.rs`. - Add that same field to `Inner` in `beacon_node/execution_layer/src/lib.rs` - Modify the logic for picking the payload in `beacon_node/execution_layer/src/lib.rs` - Add the `always-prefer-builder-payload` flag to the beacon node CLI - Test the new flags in `lighthouse/tests/beacon_node.rs` Co-authored-by: Paul Hauner <paul@paulhauner.com>
This commit is contained in:
@@ -340,6 +340,21 @@ fn trusted_peers_flag() {
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn always_prefer_builder_payload_flag() {
|
||||
CommandLineTest::new()
|
||||
.flag("always-prefer-builder-payload", None)
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| assert!(config.always_prefer_builder_payload));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn no_flag_sets_always_prefer_builder_payload_to_false() {
|
||||
CommandLineTest::new()
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| assert!(!config.always_prefer_builder_payload));
|
||||
}
|
||||
|
||||
// Tests for Eth1 flags.
|
||||
#[test]
|
||||
fn dummy_eth1_flag() {
|
||||
|
||||
Reference in New Issue
Block a user