chore(testnet): prepare for release

This commit is contained in:
nazeh
2025-02-13 20:14:17 +03:00
parent 1435fe8686
commit 44ae44c2b2
3 changed files with 11 additions and 1 deletions

View File

@@ -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

View File

@@ -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<pkarr_relay::Relay>,
}
impl Testnet {
/// Run a new testnet.
pub async fn run() -> Result<Self> {
let dht = mainline::Testnet::new(10)?;

View File

@@ -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...");