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
6 changes: 3 additions & 3 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))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Default neighborhood-mode mismatch between UI and runtime

The setup reporter's computed_default returns "zero-hop" as the default for neighborhood-mode, but the actual configuration logic in unprivileged_parse_args_configuration.rs (line 307-309) defaults to standard mode when no value is provided. This creates a mismatch where the UI displays "zero-hop" as the default, but the node actually runs in standard mode by default, misleading users about the actual behavior.

Fix in Cursor Fix in Web

}

fn is_required(&self, _params: &SetupCluster) -> bool {
Expand Down Expand Up @@ -1448,7 +1448,7 @@ mod tests {
("log-level", "warn", Default),
("mapping-protocol", "", Blank),
("min-hops", &DEFAULT_MIN_HOPS.to_string(), Default),
("neighborhood-mode", "standard", Default),
("neighborhood-mode", "zero-hop", Default),
(
"neighbors",
"masq://eth-mainnet:[email protected]:1234,masq://eth-mainnet:[email protected]:5678",
Expand Down Expand Up @@ -3287,7 +3287,7 @@ mod tests {
&None,
);

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

#[test]
Expand Down
Loading