mirror of
https://github.com/aljazceru/pubky-core.git
synced 2026-01-26 17:34:21 +01:00
fix(docs): legacy microseconds on record age docstring
This commit is contained in:
@@ -34,7 +34,7 @@ macro_rules! handle_http_error {
|
||||
pub struct ClientBuilder {
|
||||
pkarr: pkarr::ClientBuilder,
|
||||
http_request_timeout: Option<Duration>,
|
||||
/// Maximum age in microseconds before a user record should be republished.
|
||||
/// Maximum age before a user record should be republished.
|
||||
/// Defaults to 1 hour.
|
||||
max_record_age: Option<Duration>,
|
||||
}
|
||||
@@ -76,7 +76,7 @@ impl ClientBuilder {
|
||||
self
|
||||
}
|
||||
|
||||
/// Set how many microseconds old a record can be before it must be republished.
|
||||
/// Set max age a record can have before it must be republished.
|
||||
/// Defaults to 1 hour if not overridden.
|
||||
pub fn max_record_age(&mut self, max_age: Duration) -> &mut Self {
|
||||
self.max_record_age = Some(max_age);
|
||||
@@ -116,7 +116,7 @@ impl ClientBuilder {
|
||||
icann_http_builder = icann_http_builder.timeout(timeout);
|
||||
}
|
||||
|
||||
// Maximum age in microseconds before a homeserver record should be republished.
|
||||
// Maximum age before a homeserver record should be republished.
|
||||
// Default is 1 hour. It's an arbitrary decision based only anecdotal evidence for DHT eviction.
|
||||
// See https://github.com/pubky/pkarr-churn/blob/main/results-node_decay.md for latest date of record churn
|
||||
let max_record_age = self.max_record_age.unwrap_or(Duration::from_secs(60 * 60));
|
||||
@@ -161,7 +161,7 @@ pub struct Client {
|
||||
#[cfg(wasm_browser)]
|
||||
pub(crate) testnet: bool,
|
||||
|
||||
/// The record age threshold (in microseconds) before republishing.
|
||||
/// The record age threshold before republishing.
|
||||
pub(crate) max_record_age: Duration,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user