upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/sync/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/sync/mod.rs')
-rw-r--r--src/sync/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sync/mod.rs b/src/sync/mod.rs
index c4c3c7f..fb59b3c 100644
--- a/src/sync/mod.rs
+++ b/src/sync/mod.rs
@@ -512,8 +512,8 @@ impl SyncManager {
512 }; 512 };
513 513
514 // Check if relay supports NIP-77 negentropy AND negentropy is not disabled 514 // Check if relay supports NIP-77 negentropy AND negentropy is not disabled
515 let use_negentropy = !self.config.sync_disable_negentropy 515 let use_negentropy =
516 && connection.supports_negentropy().await; 516 !self.config.sync_disable_negentropy && connection.supports_negentropy().await;
517 517
518 // Unsubscribe all current subscriptions 518 // Unsubscribe all current subscriptions
519 connection.unsubscribe_all().await; 519 connection.unsubscribe_all().await;
@@ -1657,12 +1657,12 @@ impl SyncManager {
1657 1657
1658 let layer1_filters = 1; 1658 let layer1_filters = 1;
1659 let layer2_filters = if repo_count > 0 { 1659 let layer2_filters = if repo_count > 0 {
1660 ((repo_count + 99) / 100) * 3 1660 repo_count.div_ceil(100) * 3
1661 } else { 1661 } else {
1662 0 1662 0
1663 }; 1663 };
1664 let layer3_filters = if event_count > 0 { 1664 let layer3_filters = if event_count > 0 {
1665 ((event_count + 99) / 100) * 3 1665 event_count.div_ceil(100) * 3
1666 } else { 1666 } else {
1667 0 1667 0
1668 }; 1668 };