mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
p2p/discover: update comment
This commit is contained in:
parent
8570ef0f46
commit
0d8ef1f87e
1 changed files with 2 additions and 1 deletions
|
|
@ -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()
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue