Skip to content

Commit

Permalink
More Kademlia goodness...
Browse files Browse the repository at this point in the history
  • Loading branch information
ineiti committed Nov 19, 2024
1 parent f7d0372 commit 737fdb7
Show file tree
Hide file tree
Showing 2 changed files with 305 additions and 129 deletions.
14 changes: 14 additions & 0 deletions flarch/src/nodeids.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,20 @@ impl From<&Vec<U256>> for NodeIDs {
}
}

impl fmt::Display for NodeIDs {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_fmt(format_args!(
"[{}]",
&self
.0
.iter()
.map(|id| id.to_string())
.collect::<Vec<String>>()
.join(","),
))
}
}

#[cfg(test)]
mod tests {
use crate::start_logging;
Expand Down
Loading

0 comments on commit 737fdb7

Please sign in to comment.