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

chore: pkarr v2.3.1 #97

Merged
merged 3 commits into from
Jan 29, 2025
Merged
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
26 changes: 13 additions & 13 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ tokio = { version = "1.37.0", features = ["full"] }
thiserror = "1.0.49"
serde = { version = "1.0.199", features = ["derive"] }
clap = { version = "4.5.1", features = ["derive"] }
pkarr = { version = "2.2.1", features = ["dht", "async", "rand"]}
pkarr = { version = "2.3.1", features = ["dht", "async", "rand"]}
domain = {version = "0.10.3", features = ["zonefile", "bytes"]}
bytes = "1.7.1"
chrono = "0.4.38"
Expand Down
10 changes: 8 additions & 2 deletions cli/src/commands/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use std::{

use anyhow::anyhow;

use chrono::DateTime;
use clap::ArgMatches;
use pkarr::{Keypair, SignedPacket};

Expand Down Expand Up @@ -115,10 +116,15 @@ pub async fn cli_publish(matches: &ArgMatches) {

print!("Hang on...");
std::io::stdout().flush().unwrap();
let timestamp = DateTime::from_timestamp_micros(packet.timestamp() as i64).unwrap();
let result = client.publish(&packet);
print!("\r");
match result {
Ok(_) => println!("{} Successfully announced.", packet.timestamp()),
Err(e) => println!("Error {}", e.to_string()),
Ok(_) => {
println!("{} Successfully announced.", timestamp)
}
Err(e) => {
println!("{} Error {}", timestamp, e.to_string())
}
};
}
2 changes: 1 addition & 1 deletion cli/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use pkarr::{PkarrClient, PkarrClientBuilder};
/// Construct new pkarr client with no cache, no resolver, only DHT
pub fn construct_pkarr_client() -> PkarrClient {
PkarrClientBuilder::default()
// .maximum_ttl(0)
.maximum_ttl(0)
.resolvers(None)
.build()
.unwrap()
Expand Down
2 changes: 1 addition & 1 deletion server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"

[dependencies]
ctrlc = "3.4.2"
pkarr = { version = "2.2.1", features = ["dht", "async", "rand"]}
pkarr = { version = "2.3.1", features = ["dht", "async", "rand"]}
zbase32 = "0.1.2"
clap = { version = "4.4.18", features = ["derive"] }
chrono = "0.4.33"
Expand Down
Loading