p2p/discover: update comment

This commit is contained in:
Felix Lange 2024-05-28 19:06:34 +02:00
parent 8570ef0f46
commit 0d8ef1f87e

View file

@ -607,7 +607,8 @@ func (tab *Table) deleteInBucket(b *bucket, id enode.ID) *node {
} }
// bumpInBucket updates a node record if it exists in the bucket. // bumpInBucket updates a node record if it exists in the bucket.
func (tab *Table) bumpInBucket(b *bucket, newRecord *enode.Node, isInbound bool) (n *node, updated bool) { // The second return value reports whether the node's endpoint (IP/port) was updated.
func (tab *Table) bumpInBucket(b *bucket, newRecord *enode.Node, isInbound bool) (n *node, endpointChanged bool) {
i := slices.IndexFunc(b.entries, func(elem *node) bool { i := slices.IndexFunc(b.entries, func(elem *node) bool {
return elem.ID() == newRecord.ID() return elem.ID() == newRecord.ID()
}) })