Skip to content

Commit

Permalink
fix: Move peer-resolver into client examples
Browse files Browse the repository at this point in the history
  • Loading branch information
aidan46 committed Jan 30, 2025
1 parent c9556f3 commit 97b8b2e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 33 deletions.
13 changes: 1 addition & 12 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ repository = "https://github.com/eigerco/polka-storage"

[workspace]
members = [
"examples/peer-resolver",
"lib/polka-storage-proofs",
"maat",
"mater/cli",
Expand Down
19 changes: 0 additions & 19 deletions examples/peer-resolver/Cargo.toml

This file was deleted.

3 changes: 3 additions & 0 deletions storage-provider/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ tracing = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter"] }
url = { workspace = true }

[dev-dependencies]
anyhow.workspace = true
libp2p = { workspace = true, features = ["identify", "macros", "noise", "rendezvous", "tcp", "tokio", "yamux"] }

[lints]
workspace = true
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//! Peer Resolver example
//!
//! This example shows how to use the rendezvous client protocol to
//! connect to rendezvous bootstrap, and send a discovery message,
//! requesting the bootstrap node to return their registrations.
//! Then it will check the registrations to see if a given Peer ID
//! is contained in them to get a Peer ID to multiaddr mapping.
//! If the bootstrap node does not have information on the given Peer
//! ID, the example will return an error.
//! NOTE: This example is to be removed and implemented into the
//! client at some point.
use std::time::Duration;

use anyhow::{bail, Result};
Expand Down Expand Up @@ -59,7 +70,6 @@ async fn discover(
SwarmEvent::ConnectionEstablished { peer_id, .. } => {
if peer_id == rendezvous_point {
tracing::info!("Connection established with rendezvous point {}", peer_id);
tracing::info!("Connected to rendezvous point, discovering nodes...");

// Requesting rendezvous point for peer discovery
swarm
Expand Down

0 comments on commit 97b8b2e

Please sign in to comment.