diff --git a/beacon_node/src/cli.rs b/beacon_node/src/cli.rs index 0b2cda91ef..57de6c1b91 100644 --- a/beacon_node/src/cli.rs +++ b/beacon_node/src/cli.rs @@ -402,11 +402,13 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { .arg( Arg::with_name("fee-recipient") .long("fee-recipient") + .value_name("FEE-RECIPIENT") .help("Once the merge has happened, this address will receive transaction fees \ collected from any blocks produced by this node. Defaults to a junk \ address whilst the merge is in development stages. THE DEFAULT VALUE \ WILL BE REMOVED BEFORE THE MERGE ENTERS PRODUCTION") .requires("merge") + .takes_value(true) ) /* diff --git a/lighthouse/tests/beacon_node.rs b/lighthouse/tests/beacon_node.rs index 73d5a20657..6d03cafe10 100644 --- a/lighthouse/tests/beacon_node.rs +++ b/lighthouse/tests/beacon_node.rs @@ -11,7 +11,7 @@ use std::process::Command; use std::str::FromStr; use std::string::ToString; use tempfile::TempDir; -use types::{Checkpoint, Epoch, Hash256}; +use types::{Address, Checkpoint, Epoch, Hash256}; const DEFAULT_ETH1_ENDPOINT: &str = "http://localhost:8545/"; @@ -206,6 +206,24 @@ fn eth1_purge_cache_flag() { .with_config(|config| assert!(config.eth1.purge_cache)); } +// Tests for Merge flags. +#[test] +fn merge_fee_recipient_flag() { + CommandLineTest::new() + .flag("merge", None) + .flag( + "fee-recipient", + Some("0x00000000219ab540356cbb839cbe05303d7705fa"), + ) + .run_with_zero_port() + .with_config(|config| { + assert_eq!( + config.suggested_fee_recipient, + Some(Address::from_str("0x00000000219ab540356cbb839cbe05303d7705fa").unwrap()) + ) + }); +} + // Tests for Network flags. #[test] fn network_dir_flag() {