Bugfixes and testing stuff.

- Modified dummy data so new comments / votes get added in (testing background processing).
	- exposed fns for GUI rankings & testing.	
	- corrected order of extraction from ranking Map.
	- fixed up debug output.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-new_cache_system@5280 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2012-07-08 01:26:55 +00:00
parent 388bd5da9f
commit 2d31efd69b
5 changed files with 100 additions and 17 deletions

View file

@ -128,12 +128,12 @@ virtual bool getRankedPost(const uint32_t &token, RsPostedPost &post);
// These are exposed for GUI usage.
virtual bool encodePostedCache(std::string &str, uint32_t votes, uint32_t comments);
virtual bool extractPostedCache(const std::string &str, uint32_t &votes, uint32_t &comments);
virtual float calcPostScore(const RsMsgMetaData &meta);
private:
//
bool checkRankingRequest();
float calcPostScore(const RsMsgMetaData &meta);
bool processPosts();
// background processing of Votes.
@ -151,7 +151,8 @@ bool background_cleanup();
std::string genRandomId();
bool generateDummyData();
bool generateDummyData();
bool addExtraDummyData();
PostedDataProxy *mPostedProxy;
@ -179,6 +180,10 @@ bool generateDummyData();
std::map<std::string, uint32_t> mBgVoteMap; // ParentId -> Vote Count.
std::map<std::string, uint32_t> mBgCommentMap; // ThreadId -> Comment Count.
// extra dummy data.
std::list<RsPostedVote> mDummyLaterVotes;
std::list<RsPostedComment> mDummyLaterComments;
};