Skip to content

Commit

Permalink
Remove unnecessary option
Browse files Browse the repository at this point in the history
  • Loading branch information
Rigidity committed Nov 12, 2024
1 parent 4e7855c commit cea0665
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion crates/sage-wallet/src/sync_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ impl SyncManager {
let peer_count = self.state.lock().await.peer_count();

if peer_count < self.options.target_peers {
if peer_count > self.options.max_peers_for_dns {
if peer_count > 0 {
if !self.peer_discovery().await {
self.dns_discovery().await;
}
Expand Down
1 change: 0 additions & 1 deletion crates/sage-wallet/src/sync_manager/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use std::time::Duration;
#[derive(Debug, Clone, Copy)]
pub struct SyncOptions {
pub target_peers: usize,
pub max_peers_for_dns: usize,
pub dns_batch_size: usize,
pub connection_batch_size: usize,
pub max_peer_age_seconds: u64,
Expand Down
1 change: 0 additions & 1 deletion src-tauri/src/app_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ impl AppStateInner {
0
},
max_peer_age_seconds: 3600 * 8,
max_peers_for_dns: 0,
dns_batch_size: 10,
connection_batch_size: 30,
sync_delay: Duration::from_secs(1),
Expand Down

0 comments on commit cea0665

Please sign in to comment.