Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/swarm/utilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func ContainsChunkWithAddress(chunks []Chunk, a Address) bool {
return IndexOfChunkWithAddress(chunks, a) != -1
}

// ContainsChunkWithAddress reports whether Chunk with data d is present in chunks.
// ContainsChunkWithData reports whether Chunk with data d is present in chunks.
func ContainsChunkWithData(chunks []Chunk, d []byte) bool {
for _, c := range chunks {
if c != nil && bytes.Equal(c.Data(), d) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/topology/kademlia/internal/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const (
// operation whose execution modifies a specific metrics.
type RecordOp func(*Counters)

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

// IsBootnode is used to filter bootnode peers.
// Bootnode is used to filter bootnode peers.
func Bootnode() ExcludeOp {
return func(cs *Counters) bool {
return cs.IsBootnode
Expand Down
2 changes: 1 addition & 1 deletion pkg/topology/kademlia/mock/kademlia.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (m *Mock) EachConnectedPeer(f topology.EachPeerFunc, _ topology.Select) err
return nil
}

// EachPeerRev iterates from farthest bin to closest
// EachConnectedPeerRev iterates from farthest bin to closest
func (m *Mock) EachConnectedPeerRev(f topology.EachPeerFunc, _ topology.Select) error {
m.mtx.Lock()
defer m.mtx.Unlock()
Expand Down
Loading