Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Allow value for beacon_node fee-recipient argument #2884

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions beacon_node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)

/*
Expand Down
20 changes: 19 additions & 1 deletion lighthouse/tests/beacon_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/";

Expand Down Expand Up @@ -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() {
Expand Down