Skip to content

Commit

Permalink
Minor review tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsproul committed Apr 4, 2024
1 parent ea69ec9 commit 2a83bdb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion beacon_node/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ pub fn get_config<E: EthSpec>(

if cli_args.is_present("disable-proposer-reorgs") {
client_config.chain.re_org_head_threshold = None;
client_config.chain.re_org_parent_threshold = Some(ReOrgThreshold(u64::MAX));
client_config.chain.re_org_parent_threshold = None;
} else {
client_config.chain.re_org_head_threshold = Some(
clap_utils::parse_optional(cli_args, "proposer-reorg-threshold")?
Expand Down
5 changes: 4 additions & 1 deletion book/src/help_bn.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,11 @@ OPTIONS:
--proposer-reorg-epochs-since-finalization <EPOCHS>
Maximum number of epochs since finalization at which proposer reorgs are allowed. Default: 2
--proposer-reorg-parent-threshold <PERCENT>
Percentage of parent vote weight above which to attempt a proposer reorg. Default: 160%
--proposer-reorg-threshold <PERCENT>
Percentage of vote weight below which to attempt a proposer reorg. Default: 20%
Percentage of head vote weight below which to attempt a proposer reorg. Default: 20%
--prune-blobs <BOOLEAN>
Prune blobs from Lighthouse's database when they are older than the data data availability boundary relative
Expand Down
3 changes: 1 addition & 2 deletions lighthouse/tests/beacon_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2217,15 +2217,14 @@ fn enable_proposer_re_orgs_default() {
});
}

// TODO(is_parent_strong)
#[test]
fn disable_proposer_re_orgs() {
CommandLineTest::new()
.flag("disable-proposer-reorgs", None)
.run_with_zero_port()
.with_config(|config| {
assert_eq!(config.chain.re_org_head_threshold, None);
assert_eq!(config.chain.re_org_parent_threshold.unwrap().0, u64::MAX)
assert_eq!(config.chain.re_org_parent_threshold, None)
});
}

Expand Down

0 comments on commit 2a83bdb

Please sign in to comment.