Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Use new iroh-net Connection API #4

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{

#[cfg(feature = "metrics")]
use iroh_metrics::inc;
use iroh_net::{endpoint::get_remote_node_id, key::PublicKey, Endpoint, NodeAddr};
use iroh_net::{key::PublicKey, Endpoint, NodeAddr};
use serde::{Deserialize, Serialize};
use tracing::{debug, error_span, trace, Instrument};

Expand Down Expand Up @@ -115,7 +115,7 @@ where
{
let t_start = Instant::now();
let connection = connecting.await.map_err(AcceptError::connect)?;
let peer = get_remote_node_id(&connection).map_err(AcceptError::connect)?;
let peer = connection.remote_node_id().map_err(AcceptError::connect)?;
let (mut send_stream, mut recv_stream) = connection
.accept_bi()
.await
Expand Down
Loading