<!-- XE-13294 · [net/sync.go] M8: SyncAll() tidak pilih peer yang capable — sync diminta ke semua peer · testnet -->
*Markdown view of <https://bounty.xe.network/XE-13294>. The page is the record; this is the same page for reading.*

XE-13294 · Bounty

# \[net/sync.go\] M8: SyncAll() tidak pilih peer yang capable — sync diminta ke semua peer

Closed · invalid
—
[xe#439](https://github.com/xeprotocol/xe/issues/439)
filed 2026-11-12 02:51 UTC
by wahyu20260100233-ops

Verdict
:   Invalid

Tier
:   —

Claimed
:   —

Area
:   P2P / sync

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-20 00:51 UTC

Told
:   2026-11-20 00:49 UTC

### Patches

None linked.

### History

- [557584](https://bounty.xe.network/log/557584) 2026-11-20 00:49 UTC reply.mirrored
- [557086](https://bounty.xe.network/log/557086) 2026-11-20 00:48 UTC reply.sent
- [554056](https://bounty.xe.network/log/554056) 2026-11-20 00:35 UTC github.state\_pushed
- [554055](https://bounty.xe.network/log/554055) 2026-11-20 00:35 UTC github.labels
- [553358](https://bounty.xe.network/log/553358) 2026-11-20 00:33 UTC proposal.adopted
- [553167](https://bounty.xe.network/log/553167) 2026-11-20 00:33 UTC proposal.adopted
- [553166](https://bounty.xe.network/log/553166) 2026-11-20 00:33 UTC ticket.status new → closed
- [552785](https://bounty.xe.network/log/552785) 2026-11-20 00:33 UTC proposal.adopted
- [552784](https://bounty.xe.network/log/552784) 2026-11-20 00:33 UTC ticket.facts area
- [552780](https://bounty.xe.network/log/552780) 2026-11-20 00:33 UTC proposal.adopted
- [552779](https://bounty.xe.network/log/552779) 2026-11-20 00:33 UTC ticket.facts
- [550825](https://bounty.xe.network/log/550825) 2026-11-20 00:30 UTC note.added

[Full history](https://bounty.xe.network/log?ref=XE-13294) · [JSON](https://bounty.xe.network/v1/tickets/XE-13294) · [markdown](https://bounty.xe.network/XE-13294.md)

### Report

## Ringkasan

`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.

## Lokasi

- File: `net/sync.go`
- Lines: 100-122

## Kode

```
func (t *tracker) SyncAll(ctx context.Context, h host.Host, opts ...SyncOption) {
    opt := applySyncOptions(opts...)
    t.mu.RLock()
    defer t.mu.RUnlock()
    for pid := range t.peers {
        if !isConnected(t.network, pid) {
            continue
        }
        if err := t.SyncTo(ctx, h, pid, opt); err != nil {
            logging.Warnf("sync: failed to sync with %s: %v", pid, err)
        }
    }
}
```

## Impact

Peer yang tidak support sync tetap diseret. Waste resource, potensi error.

## Suggested Fix

```
func (t *tracker) SyncAll(ctx context.Context, h host.Host, opts ...SyncOption) {
    opt := applySyncOptions(opts...)
    t.mu.RLock()
    defer t.mu.RUnlock()
    for pid := range t.peers {
        if !isConnected(t.network, pid) {
            continue
        }
        if !peerMaySupportSync(h, pid) {
            continue
        }
        if err := t.SyncTo(ctx, h, pid, opt); err != nil {
            logging.Warnf("sync: failed to sync with %s: %v", pid, err)
        }
    }
}
```

### Thread

**XE desk**team2026-11-20 00:49 UTCgithub

Thanks for the report. We read it against the code and could not confirm a bug in what it describes.

This report is closed as invalid. If we have missed something, file a new report that links
https://bounty.xe.network/XE-13294 and says what; it is read like any other.
