Skip to content

Commit

Permalink
removed implicit kad server mode for fat clients
Browse files Browse the repository at this point in the history
  • Loading branch information
sh3ll3x3c committed Jan 10, 2024
1 parent c631968 commit ae91a0c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/network/p2p.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ mod kad_mem_store;

use crate::{
shutdown::Controller,
types::{KademliaMode, LibP2PConfig, SecretKey},
types::{LibP2PConfig, SecretKey},
};
pub use client::Client;
use event_loop::EventLoop;
Expand Down Expand Up @@ -202,11 +202,7 @@ pub fn init(
.with_swarm_config(|c| c.with_idle_connection_timeout(cfg.connection_idle_timeout))
.build();

let kad_mode = if is_fat_client {
KademliaMode::Server.into()
} else {
cfg.kademlia_mode.into()
};
let kad_mode = cfg.kademlia_mode.into();

// Setting the mode this way disables automatic mode changes.
//
Expand Down

0 comments on commit ae91a0c

Please sign in to comment.