Skip to content
Open
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: 1 addition & 1 deletion masq/tests/startup_shutdown_tests_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ fn masq_terminates_based_on_loss_of_connection_to_the_daemon_integration() {
assert_eq!(exit_code, None);
#[cfg(target_os = "windows")]
assert_eq!(exit_code.unwrap(), 1);
assert!(stdout.contains("neighborhood-mode standard Default"));
assert!(stdout.contains("neighborhood-mode zero-hop Default"));
assert_eq!(
stderr,
"\nThe Daemon is no longer running; masq is terminating.\n\n"
Expand Down
14 changes: 14 additions & 0 deletions node/src/bootstrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1163,6 +1163,8 @@ mod tests {
"5123",
"--data-directory",
data_dir.to_str().unwrap(),
"--neighborhood-mode",
"standard",
]),
&mut FakeStreamHolder::new().streams(),
)
Expand Down Expand Up @@ -1285,6 +1287,8 @@ mod tests {
"1.2.3.4",
"--clandestine-port",
"5123",
"--neighborhood-mode",
"standard",
]),
&mut FakeStreamHolder::new().streams(),
)
Expand Down Expand Up @@ -1338,6 +1342,8 @@ mod tests {
data_dir.to_str().unwrap(),
"--clandestine-port",
"5124",
"--neighborhood-mode",
"standard",
]),
&mut holder.streams(),
)
Expand Down Expand Up @@ -1377,6 +1383,8 @@ mod tests {
"https://booga.com",
"--ip",
"1.2.3.4",
"--neighborhood-mode",
"standard",
"--gas-price",
"11",
]),
Expand Down Expand Up @@ -1460,6 +1468,8 @@ mod tests {
"1.2.3.4,2.3.4.5",
"--ip",
"111.111.111.111",
"--neighborhood-mode",
"standard",
"--clandestine-port",
"1234",
"--data-directory",
Expand Down Expand Up @@ -1655,6 +1665,8 @@ mod tests {
"1.2.3.4",
"--data-directory",
data_dir.to_str().unwrap(),
"--neighborhood-mode",
"standard",
]),
&mut holder.streams(),
)
Expand All @@ -1680,6 +1692,8 @@ mod tests {
"https://booga.com",
"--ip",
"111.111.111.111",
"--neighborhood-mode",
"standard",
"--data-directory",
data_dir.to_str().unwrap(),
];
Expand Down
10 changes: 6 additions & 4 deletions node/src/daemon/setup_reporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@ impl ValueRetriever for NeighborhoodMode {
_persistent_config: &dyn PersistentConfiguration,
_db_password_opt: &Option<String>,
) -> Option<(String, UiSetupResponseValueStatus)> {
Some(("standard".to_string(), Default))
Some(("zero-hop".to_string(), Default))
}

fn is_required(&self, _params: &SetupCluster) -> bool {
Expand Down Expand Up @@ -1402,6 +1402,7 @@ mod tests {
("data-directory", data_dir.to_str().unwrap()),
("db-password", "password"),
("ip", "4.3.2.1"),
("neighborhood-mode", "standard"),
]
.into_iter()
.map(|(name, value)| UiSetupRequestValue::new(name, value))
Expand Down Expand Up @@ -1448,7 +1449,7 @@ mod tests {
("log-level", "warn", Default),
("mapping-protocol", "", Blank),
("min-hops", &DEFAULT_MIN_HOPS.to_string(), Default),
("neighborhood-mode", "standard", Default),
("neighborhood-mode", "standard", Set),
(
"neighbors",
"masq://eth-mainnet:[email protected]:1234,masq://eth-mainnet:[email protected]:5678",
Expand Down Expand Up @@ -2362,7 +2363,7 @@ mod tests {
Default,
),
]);
let incoming_setup = vec![("ip", "1.2.3.4")]
let incoming_setup = vec![("ip", "1.2.3.4"), ("neighborhood-mode", "standard")]
.into_iter()
.map(|(name, value)| UiSetupRequestValue::new(name, value))
.collect_vec();
Expand Down Expand Up @@ -2652,6 +2653,7 @@ mod tests {
),
UiSetupRequestValue::new("blockchain-service-url", "https://booga.com"),
UiSetupRequestValue::new("ip", "1.2.3.4"),
UiSetupRequestValue::new("neighborhood-mode", "standard"),
UiSetupRequestValue::clear("chain"),
],
)
Expand Down Expand Up @@ -3287,7 +3289,7 @@ mod tests {
&None,
);

assert_eq!(result, Some(("standard".to_string(), Default)))
assert_eq!(result, Some(("zero-hop".to_string(), Default)))
}

#[test]
Expand Down
9 changes: 8 additions & 1 deletion node/src/node_configurator/node_configurator_standard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,8 @@ mod tests {
"password",
"--ip",
"1.2.3.4",
"--neighborhood-mode",
"standard",
]);
let mut privileged_config = BootstrapperConfig::default();
privileged_config.data_directory = home_dir;
Expand Down Expand Up @@ -773,7 +775,8 @@ mod tests {
let args = ArgsBuilder::new()
.param("--blockchain-service-url", "https://booga.com")
.param("--data-directory", home_dir.to_str().unwrap())
.param("--ip", "1.2.3.4");
.param("--ip", "1.2.3.4")
.param("--neighborhood-mode", "standard");
let mut bootstrapper_config = BootstrapperConfig::new();
let multi_config = make_new_multi_config(
&app_node(),
Expand Down Expand Up @@ -1586,6 +1589,8 @@ mod tests {
"https://booga.com",
"--ip",
"1.2.3.4",
"--neighborhood-mode",
"standard",
"--gas-price",
"57",
];
Expand Down Expand Up @@ -1614,6 +1619,8 @@ mod tests {
"https://booga.com",
"--ip",
"1.2.3.4",
"--neighborhood-mode",
"standard",
];

let config = subject
Expand Down
Loading
Loading