5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-13 00:30:28 +00:00

slightly better variable naming

This commit is contained in:
Arceliar 2018-05-16 17:36:37 -05:00
parent 800ccaa3d4
commit 6b51b44cbf

View File

@ -469,14 +469,14 @@ func (t *dht) doMaintenance() {
continue continue
} }
// This is a good spot to check if a node is worth pinging // This is a good spot to check if a node is worth pinging
add := len(b.other) < dht_bucket_size doPing := len(b.other) < dht_bucket_size
for _, info := range b.other { for _, info := range b.other {
if dht_firstCloserThanThird(rumor.info.getNodeID(), &t.nodeID, info.getNodeID()) { if dht_firstCloserThanThird(rumor.info.getNodeID(), &t.nodeID, info.getNodeID()) {
// Add the node if they are closer to us than someone in the same bucket // Add the node if they are closer to us than someone in the same bucket
add = true doPing = true
} }
} }
if !add { if !doPing {
continue continue
} }
} }