mirror of
https://github.com/aljazceru/pubky-core.git
synced 2026-01-14 11:44:32 +01:00
chore(testnet): prepare for release
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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)?;
|
||||
|
||||
|
||||
@@ -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...");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user