From 7182a36517163d414d79b72f6fb8dbd749a4cac2 Mon Sep 17 00:00:00 2001 From: Jedrzej Nowak Date: Wed, 16 Oct 2024 13:38:19 +0200 Subject: [PATCH] added missing files --- src/{partial_quicksync.rs => incremental_quicksync.rs} | 8 ++++---- src/main.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) rename src/{partial_quicksync.rs => incremental_quicksync.rs} (98%) diff --git a/src/partial_quicksync.rs b/src/incremental_quicksync.rs similarity index 98% rename from src/partial_quicksync.rs rename to src/incremental_quicksync.rs index 29841dd..7d6b834 100644 --- a/src/partial_quicksync.rs +++ b/src/incremental_quicksync.rs @@ -11,7 +11,7 @@ use std::{ }; use zstd::stream::Decoder; -pub(crate) const DEFAULT_BASE_URL: &str = "https://quicksync-incrementals.spacemesh.network"; +pub(crate) const DEFAULT_BASE_URL: &str = "https://quicksync-partials.spacemesh.network"; #[derive(Clone, Debug, PartialEq, Eq, parse_display::Display, parse_display::FromStr)] #[display("{from},{to},{hash}")] @@ -653,7 +653,7 @@ mod tests { .with_body(".import backup_source.db layers") .create(); - let err = super::partial_restore(&server.url(), &db_path, dir.path(), 0, 0).unwrap_err(); + let err = super::incremental_restore(&server.url(), &db_path, dir.path(), 0, 0).unwrap_err(); assert!(err.to_string().contains("unexpected hash")); mock_metadata.assert(); mock_query.assert(); @@ -679,7 +679,7 @@ mod tests { .with_body(metadata) .create(); - let err = super::partial_restore(&server.url(), &db_path, dir.path(), 0, 0).unwrap_err(); + let err = super::incremental_restore(&server.url(), &db_path, dir.path(), 0, 0).unwrap_err(); assert!(err .to_string() .contains("No suitable restore points found, seems that state.sql is too old")); @@ -705,7 +705,7 @@ mod tests { .with_status(404) .with_body("Not Found") .create(); - let err = super::partial_restore(&server.url(), &db_path, dir.path(), 0, 0).unwrap_err(); + let err = super::incremental_restore(&server.url(), &db_path, dir.path(), 0, 0).unwrap_err(); println!("{}", err); assert!(err .to_string() diff --git a/src/main.rs b/src/main.rs index 56cc437..fee07fd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,8 +11,8 @@ mod checksum; mod download; mod eta; mod go_spacemesh; +mod incremental_quicksync; mod parsers; -mod partial_quicksync; mod read_error_response; mod reader_with_bytes; mod sql; @@ -24,8 +24,8 @@ use anyhow::{anyhow, Context}; use checksum::*; use download::download_with_retries; use go_spacemesh::get_version; -use parsers::*; use incremental_quicksync::{check_for_restore_points, incremental_restore}; +use parsers::*; use sql::get_last_layer_from_db; use utils::*;