Bob's reputations code

- enables score calculation

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7230 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2014-04-04 22:07:18 +00:00
parent 2bed14865f
commit 11fa133377

View File

@ -509,12 +509,17 @@ bool p3IdService::getReputation(const RsGxsId &id, GixsReputation &rep)
if (mPublicKeyCache.fetch(id, data))
{
rep.id = id;
// Score > 0 is okay.
// Will extract score from Cache Info.
// For the moment just return positive number.
rep.score = 10;
return true;
rep.score = data.details.mReputation.mOverallScore;
std::cerr << "p3IdService::getReputation() id: ";
std::cerr << id.toStdString() << " score: " <<
rep.score;
std::cerr << std::endl;
return true;
}
std::cerr << "p3IdService::getReputation() id: ";
std::cerr << id.toStdString() << " not cached";
std::cerr << std::endl;
return false;
}