Sync fixes, hole punch address family filtering, ManifestPush blob fetch
Per-peer sync (People tab Sync button) now resets last_sync_ms to 0 so the responder sends ALL posts, not just posts newer than last sync. ManifestPush post discovery now fetches blobs alongside discovered posts while the connection is live, instead of waiting for the next prefetch cycle. Hole punch: filter_reachable_families() checks endpoint bound sockets and removes addresses the local endpoint can't reach (IPv4-only won't try IPv6). Applied to hole_punch_single, hole_punch_parallel, hole_punch_with_scanning. Relay introduce paths switched from is_publicly_routable to is_shareable_addr so LAN addresses (192.168.x.x) are included for same-WiFi hole punching. is_shareable_addr made pub(crate). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9e87679c39
commit
1030dc21a7
3 changed files with 90 additions and 15 deletions
|
|
@ -2421,6 +2421,12 @@ impl Node {
|
|||
/// Connect to a peer and establish a mesh connection
|
||||
pub async fn sync_with(&self, peer_id: NodeId) -> anyhow::Result<()> {
|
||||
self.connect_by_node_id(peer_id).await?;
|
||||
// Reset last_sync_ms for this author so the responder sends ALL posts,
|
||||
// not just posts newer than our last sync timestamp.
|
||||
{
|
||||
let storage = self.storage.get().await;
|
||||
let _ = storage.update_follow_last_sync(&peer_id, 0);
|
||||
}
|
||||
let stats = self.network.conn_handle().pull_from_peer(&peer_id).await?;
|
||||
// Also fetch engagement data (reactions, comments) for posts we hold
|
||||
let engagement = self.network.conn_handle().fetch_engagement_from_peer(&peer_id).await.unwrap_or(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue