Checking for existing entries is pointless when the Ring starts empty

This commit is contained in:
Bryan Boreham authored and Matthias Radestock committed 2016-02-04 15:12:13 +00:00
1 parent 839eb28310
commit a5c9898884
1 file changed
+1 -6
+1 -6
View File
@@ -356,12 +356,7 @@ func (r *Ring) ClaimForPeers(peers []mesh.PeerName) {
}
}
if e, found := r.Entries.get(pos); found {
e.update(peer, share)
} else {
r.Entries.insert(entry{Token: pos, Peer: peer, Free: share})
}
r.Entries.insert(entry{Token: pos, Peer: peer, Free: share})
pos += address.Address(share)
}