On Tuesday 05 August 2008 15:31, Julien Cornuwel wrote:
> Matthew Toseland a ?crit :
>
> >> + if(trusterScore.getCapacity() > 0) {
> >> + newScore += trusterScore.getCapacity() *
> >> trusterTrust.getValue() /
100;
> >> + if(newRank == -1 || newRank >
> >> trusterScore.getRank())
> >> + newRank = trusterScore.getRank();
> >
> > Surely this should be || newRank < trusterScore.getRank()? Larger numbers
=
> > less trusted, right?
>
> Nope, that code gets the lowest truster's capacity (most trusted),
> different from -1.
You are fetching rank here, not capacity. Lower is better for rank (unless
it's -1). No?
>
> > Does the code correctly handle rank upgrades? Downgrades?
>
> Yes, it does.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20080805/7f3ccb69/attachment.pgp>