From 0d8ef1f87e1053ec97621a7931a956deb05820a8 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 28 May 2024 19:06:34 +0200 Subject: [PATCH] p2p/discover: update comment --- p2p/discover/table.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/p2p/discover/table.go b/p2p/discover/table.go index b3d569d965..2b4ba7f5d8 100644 --- a/p2p/discover/table.go +++ b/p2p/discover/table.go @@ -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. -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 { return elem.ID() == newRecord.ID() })