Skip to content

Commit

Permalink
chore: add missing accesors
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsanbear committed Jun 18, 2024
1 parent 3a0db4c commit e39f43a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mai-sdk-core/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ use std::{
use tokio::{select, sync::RwLock};

use crate::{
distributed_kv_store::{GetEvent, SetEvent},
event_bridge::{EventBridge, PublishEvents},
handler::Startable,
distributed_kv_store::{GetEvent, SetEvent},
};

use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -191,6 +191,14 @@ impl P2PNetwork {
psk,
}
}

pub fn listen_addrs(&self) -> Vec<String> {
self.listen_addrs.iter().map(|a| a.to_string()).collect()
}

pub fn bootstrap_addrs(&self) -> Vec<String> {
self.bootstrap_addrs.iter().map(|a| a.to_string()).collect()
}
}

async fn handle_set_event(kad: &mut kad::Behaviour<MemoryStore>, event: SetEvent) -> Result<()> {
Expand Down

0 comments on commit e39f43a

Please sign in to comment.