From 44ae44c2b25b70899a67e7fe922cf76f14e60241 Mon Sep 17 00:00:00 2001 From: nazeh Date: Thu, 13 Feb 2025 20:14:17 +0300 Subject: [PATCH] chore(testnet): prepare for release --- pubky-testnet/README.md | 2 +- pubky-testnet/src/lib.rs | 9 +++++++++ pubky/src/native/api/auth.rs | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/pubky-testnet/README.md b/pubky-testnet/README.md index 7f17efe..44eb00f 100644 --- a/pubky-testnet/README.md +++ b/pubky-testnet/README.md @@ -2,7 +2,7 @@ A local test network for developing Pubky Core or applications depending on it. -All resources are ephemeral, databases are in the operating system's temporaray directories, and all servers are closed as the testnet dropped. +All resources are ephemeral, databases are in the operating system's temporary directories, and all servers are closed as the testnet dropped. ## Usage diff --git a/pubky-testnet/src/lib.rs b/pubky-testnet/src/lib.rs index c121c28..7a41b5e 100644 --- a/pubky-testnet/src/lib.rs +++ b/pubky-testnet/src/lib.rs @@ -1,3 +1,10 @@ +#![doc = include_str!("../README.md")] +//! + +#![deny(missing_docs)] +#![deny(rustdoc::broken_intra_doc_links)] +#![cfg_attr(any(), deny(clippy::unwrap_used))] + use std::time::Duration; use anyhow::Result; @@ -7,12 +14,14 @@ use pubky_common::timestamp::Timestamp; use pubky_homeserver::Homeserver; use url::Url; +/// A local test network for Pubky Core development. pub struct Testnet { dht: mainline::Testnet, relays: Vec, } impl Testnet { + /// Run a new testnet. pub async fn run() -> Result { let dht = mainline::Testnet::new(10)?; diff --git a/pubky/src/native/api/auth.rs b/pubky/src/native/api/auth.rs index 4031d7c..7085b11 100644 --- a/pubky/src/native/api/auth.rs +++ b/pubky/src/native/api/auth.rs @@ -247,6 +247,7 @@ impl Client { break Ok(response); } Err(error) => { + // TODO: test again after Rqewest support timeout if error.is_timeout() && !tx.is_disconnected() { cross_debug!("Connection to HttpRelay timedout, reconnecting...");