upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs7
1 files changed, 7 insertions, 0 deletions
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 {
104 /// Note: The connection timeout is capped at this value 104 /// Note: The connection timeout is capped at this value
105 #[arg(long, env = "NGIT_SYNC_BASE_BACKOFF_SECS", default_value_t = 5)] 105 #[arg(long, env = "NGIT_SYNC_BASE_BACKOFF_SECS", default_value_t = 5)]
106 pub sync_base_backoff_secs: u64, 106 pub sync_base_backoff_secs: u64,
107
108 /// Disable NIP-77 negentropy sync (default: false)
109 /// When enabled, sync will use REQ+EOSE instead of negentropy for history sync.
110 /// Primarily useful for testing that sync works without negentropy support.
111 #[arg(long, env = "NGIT_SYNC_DISABLE_NEGENTROPY", default_value_t = false)]
112 pub sync_disable_negentropy: bool,
107} 113}
108 114
109impl Config { 115impl Config {
@@ -163,6 +169,7 @@ impl Config {
163 sync_max_backoff_secs: 3600, 169 sync_max_backoff_secs: 3600,
164 sync_disconnect_check_interval_secs: 60, 170 sync_disconnect_check_interval_secs: 60,
165 sync_base_backoff_secs: 5, 171 sync_base_backoff_secs: 5,
172 sync_disable_negentropy: false,
166 } 173 }
167 } 174 }
168} 175}