mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 08:56:30 +03:00
feat: add more logging for iroh initialization and peer addition
This commit is contained in:
@@ -232,6 +232,7 @@ impl ChannelState {
|
|||||||
impl Context {
|
impl Context {
|
||||||
/// Create iroh endpoint and gossip.
|
/// Create iroh endpoint and gossip.
|
||||||
async fn init_peer_channels(&self) -> Result<Iroh> {
|
async fn init_peer_channels(&self) -> Result<Iroh> {
|
||||||
|
info!(self, "Initializing peer channels.");
|
||||||
let secret_key = SecretKey::generate();
|
let secret_key = SecretKey::generate();
|
||||||
let public_key = secret_key.public();
|
let public_key = secret_key.public();
|
||||||
|
|
||||||
|
|||||||
@@ -1461,10 +1461,11 @@ async fn add_parts(
|
|||||||
let iroh = context.get_or_try_init_peer_channel().await?;
|
let iroh = context.get_or_try_init_peer_channel().await?;
|
||||||
iroh.maybe_add_gossip_peers(topic, vec![node_addr]).await?;
|
iroh.maybe_add_gossip_peers(topic, vec![node_addr]).await?;
|
||||||
}
|
}
|
||||||
|
info!(context, "Added iroh peer to the topic of {instance_id}.");
|
||||||
} else {
|
} else {
|
||||||
warn!(
|
warn!(
|
||||||
context,
|
context,
|
||||||
"Could not add iroh peer because {instance_id} has no topic"
|
"Could not add iroh peer because {instance_id} has no topic."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
chat_id = DC_CHAT_ID_TRASH;
|
chat_id = DC_CHAT_ID_TRASH;
|
||||||
|
|||||||
Reference in New Issue
Block a user