refactor: make Peer.Connections() return a set instead of a slice
This is more flexible since it allows callers to perform efficient lookups on the result.
This commit is contained in:
1 parent
fe4d8b7767
commit
9b9d8a03aa
6 files changed
+16
-9
No files matched your search
+1
-1
@@ -162,7 +162,7 @@ func (routes *Routes) calculateBroadcast(establishedAndSymmetric bool) map[PeerN
|
||||
// This is rather similar to the inner loop on
|
||||
// peer.Routes(...); the main difference is in the
|
||||
// locking.
|
||||
for _, conn := range ourself.Connections() {
|
||||
for conn := range ourself.Connections() {
|
||||
if establishedAndSymmetric && !conn.Established() {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user