From a77c431e378a3cfcddb4b33317319412799c96cb Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 30 Mar 2015 17:23:28 +0200 Subject: p2p/discover: fix off by one error causing buckets to contain duplicates --- p2p/discover/table.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'p2p/discover/table.go') diff --git a/p2p/discover/table.go b/p2p/discover/table.go index 842f55d9f..dbf86c084 100644 --- a/p2p/discover/table.go +++ b/p2p/discover/table.go @@ -328,7 +328,7 @@ func (b *bucket) bump(n *Node) bool { if b.entries[i].ID == n.ID { n.bumpActive() // move it to the front - copy(b.entries[1:], b.entries[:i+1]) + copy(b.entries[1:], b.entries[:i]) b.entries[0] = n return true } -- cgit v1.2.3