From 52489d3b1a7d79e164b4cc901b53fd06c05ce1b1 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 11 Dec 2025 16:45:34 +0000 Subject: sync: test sync works without negentropy and add disable option in sync --- src/config.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs index f3a3e2a..8c6de05 100644 --- a/src/config.rs +++ b/src/config.rs @@ -104,6 +104,12 @@ pub struct Config { /// Note: The connection timeout is capped at this value #[arg(long, env = "NGIT_SYNC_BASE_BACKOFF_SECS", default_value_t = 5)] pub sync_base_backoff_secs: u64, + + /// Disable NIP-77 negentropy sync (default: false) + /// When enabled, sync will use REQ+EOSE instead of negentropy for history sync. + /// Primarily useful for testing that sync works without negentropy support. + #[arg(long, env = "NGIT_SYNC_DISABLE_NEGENTROPY", default_value_t = false)] + pub sync_disable_negentropy: bool, } impl Config { @@ -163,6 +169,7 @@ impl Config { sync_max_backoff_secs: 3600, sync_disconnect_check_interval_secs: 60, sync_base_backoff_secs: 5, + sync_disable_negentropy: false, } } } -- cgit v1.2.3