vppn/peer/duplist.go
2024-12-13 21:30:06 +01:00

18 lines
251 B
Go

package peer
type dupList struct {
items [64]uint64
index int
}
func (l *dupList) isDuplicate(in uint64) bool {
for _, i := range l.items {
if i == in {
return true
}
}
l.items[l.index] = in
l.index = (l.index + 1) % 64
return false
}