Skip to content

Commit e214757

Browse files
committed
ETCM-168: Don't try to bond with the same neighbor again.
1 parent 3ebc19f commit e214757

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scalanet/discovery/src/io/iohk/scalanet/discovery/ethereum/v4/DiscoveryService.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ object DiscoveryService {
797797
) >>
798798
Task
799799
.parTraverseUnordered(contacts)(fetchNeighbors)
800-
.map(_.flatten.distinct)
800+
.map(_.flatten.distinct.filterNot(neighbors))
801801
.flatMap(bondNeighbors)
802802
.flatMap { newNeighbors =>
803803
val nextClosest = (closest ++ newNeighbors).take(config.kademliaBucketSize)

0 commit comments

Comments
 (0)