Skip to content

Commit

Permalink
chore: resolve rebase conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
maqi committed Dec 12, 2024
1 parent e4767ff commit 8549d84
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
17 changes: 4 additions & 13 deletions ant-bootstrap/src/initial_peers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,10 @@ impl PeersArgs {

let mut bootstrap_addresses = vec![];

// Read from `ANT_PEERS` environment variable if present
if let Ok(addrs) = std::env::var(ANT_PEERS_ENV) {
for addr_str in addrs.split(',') {
if let Some(addr) = craft_valid_multiaddr_from_str(addr_str, false) {
info!("Adding addr from environment variable: {addr}");
bootstrap_addresses.push(BootstrapAddr::new(addr));
} else {
warn!("Invalid multiaddress format from environment variable: {addr_str}");
}
}
// Read from ANT_PEERS environment variable if present
bootstrap_addresses.extend(Self::read_bootstrap_addr_from_env());

if !bootstrap_addresses.is_empty() {
return Ok(bootstrap_addresses);
}

Expand All @@ -150,9 +144,6 @@ impl PeersArgs {
}
}

// Read from ANT_PEERS environment variable if present
bootstrap_addresses.extend(Self::read_bootstrap_addr_from_env());

if let Some(count) = count {
if bootstrap_addresses.len() >= count {
bootstrap_addresses.sort_by_key(|addr| addr.failure_rate() as u64);
Expand Down
2 changes: 1 addition & 1 deletion autonomi/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl Client {
let peers = if let Some(peers) = config.peers {
peers
} else {
match peers_args.get_addrs(None).await {
match peers_args.get_addrs(None, None).await {
Ok(peers) => peers,
Err(e) => return Err(e),
}
Expand Down

0 comments on commit 8549d84

Please sign in to comment.