mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 16:45:19 +00:00
feat: Implement Request Sync Manager (V2 Sync) (#965)
* feat: Implement Request Sync Manager (V2 Sync) - Add RequestSyncManager to track and attribute sync requests - Update BitchatPacket and BinaryProtocol to support IS_RSR flag (0x10) - Update RequestSyncPacket with new TLV fields (sinceTimestamp, fragmentIdFilter) - Update GossipSyncManager to use unicast sync requests and mark responses as RSR - Update BLEService to enforce timestamp validation for normal packets and exempt valid RSRs - Add documentation for the new sync manager mechanism * fix: Resolve compilation errors in V2 Sync implementation - Remove duplicate restartGossipManager in BLEService - Add missing TransportConfig constants for sync - Add 'sync' log category to BitLogger - Add missing BitLogger import in GossipSyncManager * fix: Update tests for V2 Sync changes - Add requestSyncManager parameter to GossipSyncManager init in tests - Implement getConnectedPeers stub in RecordingDelegate - Remove unused variable warning in SubscriptionRateLimitTests --------- Co-authored-by: a1denvalu3 <> Co-authored-by: jack <212554440+jackjackbits@users.noreply.github.com>
This commit is contained in:
co-authored by
a1denvalu3 <>
jack
parent
9964710de2
commit
3fc64f6168
@@ -75,7 +75,6 @@ struct SubscriptionRateLimitTests {
|
||||
@Test("Max attempts threshold prevents complete enumeration")
|
||||
func maxAttemptsThresholdPreventsEnumeration() {
|
||||
let maxAttempts = TransportConfig.bleSubscriptionRateLimitMaxAttempts
|
||||
let minInterval = TransportConfig.bleSubscriptionRateLimitMinSeconds
|
||||
|
||||
// After max attempts within window, announces are suppressed entirely
|
||||
// This means an attacker gets at most maxAttempts announces per window
|
||||
|
||||
Reference in New Issue
Block a user