{"id":"XE-13294","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"439","source_url":"https://github.com/xeprotocol/xe/issues/439","reporter_id":2483,"title":"[net/sync.go] M8: SyncAll() tidak pilih peer yang capable — sync diminta ke semua peer","area":"p2p-sync","claimed_tier":null,"assessed_tier":null,"verdict":"invalid","duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"invalid","github_state":"closed","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-14T20:42:08.600850+00:00","updated_at":"2026-11-20T00:51:16.922204+00:00","source_created_at":"2026-11-12T02:51:57+00:00","told_at":"2026-11-20T00:49:41+00:00","status_changed_at":"2026-11-20T00:33:26.163076+00:00","url":"https://bounty.xe.network/XE-13294","body":"## Ringkasan\n`SyncAll` iterate semua peer dan panggil `SyncTo` untuk setiap peer yang connected. Tidak ada filter apakah peer tersebut support sync protocol. Peer yang tidak support sync tetap diseret.\n\n## Lokasi\n- File: `net/sync.go`\n- Lines: 100-122\n\n## Kode\n```go\nfunc (t *tracker) SyncAll(ctx context.Context, h host.Host, opts ...SyncOption) {\n    opt := applySyncOptions(opts...)\n    t.mu.RLock()\n    defer t.mu.RUnlock()\n    for pid := range t.peers {\n        if !isConnected(t.network, pid) {\n            continue\n        }\n        if err := t.SyncTo(ctx, h, pid, opt); err != nil {\n            logging.Warnf(\"sync: failed to sync with %s: %v\", pid, err)\n        }\n    }\n}\n```\n\n## Impact\nPeer yang tidak support sync tetap diseret. Waste resource, potensi error.\n\n## Suggested Fix\n```go\nfunc (t *tracker) SyncAll(ctx context.Context, h host.Host, opts ...SyncOption) {\n    opt := applySyncOptions(opts...)\n    t.mu.RLock()\n    defer t.mu.RUnlock()\n    for pid := range t.peers {\n        if !isConnected(t.network, pid) {\n            continue\n        }\n        if !peerMaySupportSync(h, pid) {\n            continue\n        }\n        if err := t.SyncTo(ctx, h, pid, opt); err != nil {\n            logging.Warnf(\"sync: failed to sync with %s: %v\", pid, err)\n        }\n    }\n}\n```","patch_refs":[],"thread":[{"id":13380,"source":"github","source_ref":"7026796585","author":"XE desk","team":true,"body":"Thanks for the report. We read it against the code and could not confirm a bug in what it describes.\n\nThis report is closed as invalid. If we have missed something, file a new report that links\nhttps://bounty.xe.network/XE-13294 and says what; it is read like any other.","created_at":"2026-11-20T00:49:41+00:00"}]}