diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-12-11 16:45:34 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-12-11 16:46:01 +0000 |
| commit | 52489d3b1a7d79e164b4cc901b53fd06c05ce1b1 (patch) | |
| tree | 9be147a22a95b7634a8120a60f2cd8899805088a /src/config.rs | |
| parent | 6d0447f31eb9f9282e60ac3c90c665a8b3781331 (diff) | |
sync: test sync works without negentropy and add disable option in sync
Diffstat (limited to 'src/config.rs')
| -rw-r--r-- | src/config.rs | 7 |
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 | ||
| 109 | impl Config { | 115 | impl 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 | } |