> -----Original Message-----
> From: devl-bounces at freenetproject.org 
> [mailto:devl-bounces at freenetproject.org] On Behalf Of Julien Cornuwel
> Sent: Tuesday, November 11, 2008 3:15 PM
> To: devl at freenetproject.org
> Subject: Re: [freenet-dev] [freenet-cvs] r23480 - trunk/plugins/WoT
> 
> xor at freenetproject.org a ?crit :
> > Author: xor
> > Date: 2008-11-11 09:26:12 +0000 (Tue, 11 Nov 2008) New 
> Revision: 23480
> > 
> > Modified:
> >    trunk/plugins/WoT/Identity.java
> > Log:
> > Add FIXME.
> > 
> > Modified: trunk/plugins/WoT/Identity.java
> > +   /* 
> > +    * FIXME:
> > +    * I suggest before releasing we should write a 
> getRealScore() function which recalculates the score from all 
> Trust objects which are stored
> > +    * in the database. We could then assert(getScore() == 
> getRealScore()) for verifying that the database is consistent 
> and watch for some time
> > +    * whether it stays consistent, just to make sure that 
> there are no flaws in the code.
> > +    */
> 
> Caution, this calculation is very expensive and difficult to 
> do backwards. To calculate an identity's score, you need to 
> know its trusters capacity and so on...

I know. But we will have to test whether the plugin's database
stays consistent over a long time. Threading issues etc. might
break it.

Aand this is one of the only ways of testing.
The getScore()==getRealScore() check should be run in debug mode
only (i.e. assert()) of course. Or maybe once a day in the first
few releases of WoT.


Reply via email to