Skip to content

Commit 068295f

Browse files
committed
Log the zbase32 encoded node id on publish and resolve
1 parent 3fa00e0 commit 068295f

File tree

1 file changed

+4
-2
lines changed
  • iroh-pkarr-node-discovery/src

1 file changed

+4
-2
lines changed

iroh-pkarr-node-discovery/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ impl Discovery for PkarrNodeDiscovery {
8484
return;
8585
};
8686
let this = self.clone();
87+
let z32 = keypair.public_key().to_z32();
8788
let curr = tokio::spawn(async move {
8889
loop {
8990
// initial delay. If the task gets aborted before this delay is over,
@@ -95,7 +96,8 @@ impl Discovery for PkarrNodeDiscovery {
9596
match res {
9697
Ok(info) => {
9798
tracing::debug!(
98-
"pkarr publish success. published to {} nodes",
99+
"pkarr publish success. published under {} to {} nodes",
100+
z32,
99101
info.stored_at().len()
100102
);
101103
for node in info.stored_at() {
@@ -125,11 +127,11 @@ impl Discovery for PkarrNodeDiscovery {
125127
) -> BoxFuture<'a, anyhow::Result<iroh_net::AddrInfo>> {
126128
let this = self.clone();
127129
async move {
128-
tracing::info!("resolving {}", node_id);
129130
let Ok(pkarr_public_key) = pkarr::PublicKey::try_from(*node_id.as_bytes()) else {
130131
tracing::error!("invalid node id");
131132
anyhow::bail!("invalid node id");
132133
};
134+
tracing::info!("resolving {} as {}", node_id, pkarr_public_key.to_z32());
133135
let packet = this
134136
.0
135137
.pkarr

0 commit comments

Comments
 (0)