Skip to content

Commit 6dfa847

Browse files
chore: fix some function names in comment (#5065)
Signed-off-by: highcloudwind <[email protected]>
1 parent 4ee9909 commit 6dfa847

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

pkg/swarm/utilities.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func ContainsChunkWithAddress(chunks []Chunk, a Address) bool {
4848
return IndexOfChunkWithAddress(chunks, a) != -1
4949
}
5050

51-
// ContainsChunkWithAddress reports whether Chunk with data d is present in chunks.
51+
// ContainsChunkWithData reports whether Chunk with data d is present in chunks.
5252
func ContainsChunkWithData(chunks []Chunk, d []byte) bool {
5353
for _, c := range chunks {
5454
if c != nil && bytes.Equal(c.Data(), d) {

pkg/topology/kademlia/internal/metrics/metrics.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const (
3333
// operation whose execution modifies a specific metrics.
3434
type RecordOp func(*Counters)
3535

36-
// Bootnode will mark the peer metric as bootnode based on the bool arg.
36+
// IsBootnode will mark the peer metric as bootnode based on the bool arg.
3737
func IsBootnode(b bool) RecordOp {
3838
return func(cs *Counters) {
3939
cs.Lock()
@@ -324,7 +324,7 @@ func (c *Collector) IsUnreachable(addr swarm.Address) bool {
324324
// ExcludeOp is a function type used to filter peers on certain fields.
325325
type ExcludeOp func(*Counters) bool
326326

327-
// IsBootnode is used to filter bootnode peers.
327+
// Bootnode is used to filter bootnode peers.
328328
func Bootnode() ExcludeOp {
329329
return func(cs *Counters) bool {
330330
return cs.IsBootnode

pkg/topology/kademlia/mock/kademlia.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func (m *Mock) EachConnectedPeer(f topology.EachPeerFunc, _ topology.Select) err
107107
return nil
108108
}
109109

110-
// EachPeerRev iterates from farthest bin to closest
110+
// EachConnectedPeerRev iterates from farthest bin to closest
111111
func (m *Mock) EachConnectedPeerRev(f topology.EachPeerFunc, _ topology.Select) error {
112112
m.mtx.Lock()
113113
defer m.mtx.Unlock()

0 commit comments

Comments
 (0)