Skip to content

Commit

Permalink
sui: ensure local fullnode uses stable 9000 port for its jsonrpc service
Browse files Browse the repository at this point in the history
  • Loading branch information
bmwill committed Jun 1, 2022
1 parent 3acaf2a commit bfa6d76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/sui-config/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fn default_metrics_address() -> SocketAddr {
SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), 9184)
}

fn default_json_rpc_address() -> SocketAddr {
pub fn default_json_rpc_address() -> SocketAddr {
use std::net::{IpAddr, Ipv4Addr};
SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), 9000)
}
Expand Down
7 changes: 3 additions & 4 deletions crates/sui/src/sui_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,9 @@ impl SuiCommand {
wallet_config.save(&wallet_path)?;
info!("Wallet config file is stored in {:?}.", wallet_path);

let fullnode_config = network_config
.generate_fullnode_config()
.persisted(&sui_config_dir.join(SUI_FULLNODE_CONFIG));
fullnode_config.save()?;
let mut fullnode_config = network_config.generate_fullnode_config();
fullnode_config.json_rpc_address = sui_config::node::default_json_rpc_address();
fullnode_config.save(sui_config_dir.join(SUI_FULLNODE_CONFIG))?;

for (i, validator) in network_config
.into_validator_configs()
Expand Down

0 comments on commit bfa6d76

Please sign in to comment.