Commit 81c83cf6 authored by Cédric Moreau's avatar Cédric Moreau

Fix: some links were not used for WoT tests, hence kicking wrongly

parent 29824999
...@@ -208,7 +208,7 @@ LinkSchema.statics.isOver3StepsOfAMember = function (key, members, done) { ...@@ -208,7 +208,7 @@ LinkSchema.statics.isOver3StepsOfAMember = function (key, members, done) {
Link.find({ target: fpr, obsolete: false }, function (err, links) { Link.find({ target: fpr, obsolete: false }, function (err, links) {
dist1Links = []; dist1Links = [];
links.forEach(function(lnk){ links.forEach(function(lnk){
dist1Links.push(lnk.fingerprint); dist1Links.push(lnk.source);
}); });
next(err); next(err);
}); });
...@@ -255,7 +255,7 @@ LinkSchema.statics.isOver3StepsOfAMember = function (key, members, done) { ...@@ -255,7 +255,7 @@ LinkSchema.statics.isOver3StepsOfAMember = function (key, members, done) {
Link.find({ source: member, obsolete: false }, function (err, links) { Link.find({ source: member, obsolete: false }, function (err, links) {
dist2Links = []; dist2Links = [];
links.forEach(function(lnk){ links.forEach(function(lnk){
dist2Links.push(lnk.fingerprint); dist2Links.push(lnk.target);
}); });
next(err); next(err);
}); });
......
...@@ -631,7 +631,7 @@ function KeyService (conn, conf, PublicKeyService) { ...@@ -631,7 +631,7 @@ function KeyService (conn, conf, PublicKeyService) {
}, },
function (members, next){ function (members, next){
// If a member is over 3 steps from the whole WoT, has to be kicked // If a member is over 3 steps from the whole WoT, has to be kicked
async.forEach(members, function(key, callback){ async.forEachSeries(members, function(key, callback){
var fpr = key.fingerprint; var fpr = key.fingerprint;
async.waterfall([ async.waterfall([
function (next){ function (next){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment