On Tuesday 11 November 2008 01:24, xor at freenetproject.org wrote:
> Author: xor
> Date: 2008-11-11 01:24:25 +0000 (Tue, 11 Nov 2008)
> New Revision: 23475
> 
> Modified:
>    trunk/plugins/WoT/introduction/IntroductionPuzzle.java
>    trunk/plugins/WoT/introduction/IntroductionServer.java
> Log:
> Implement some more of the introduction code.
> 
> Modified: trunk/plugins/WoT/introduction/IntroductionPuzzle.java
> ===================================================================
> --- trunk/plugins/WoT/introduction/IntroductionPuzzle.java    2008-11-10 
18:50:52 UTC (rev 23474)
> +++ trunk/plugins/WoT/introduction/IntroductionPuzzle.java    2008-11-11 
01:24:25 UTC (rev 23475)
...
> +     
> +     /**
> +      * Get the URI at which to look for a solution of this puzzle (if 
> someone 
solved it)
> +      */
> +     public FreenetURI getSolutionURI() {
> +             return getSolutionURI(mSolution);
> +     }
> +     
> +     /**
> +      * Get the URI at which to insert the solution of this puzzle.
> +      */
> +     public FreenetURI getSolutionURI(String guessOfSolution) {
> +             String dayOfInsertion = new 
SimpleDateFormat("yyyy-MM-dd").format(mDateOfInsertion);
> +             return new FreenetURI("KSK",    INTRODUCTION_CONTEXT + "|" +
> +                                                             
> mInserter.getId() + "|" +
> +                                                             dayOfInsertion 
> + "|" +
> +                                                             mIndex + "|" +
> +                                                             
> guessOfSolution); /* FIXME: hash the solution!! */

Why do you need to hash the solution?

> +     }
> +     
>       public byte[] getPuzzle() {
>               return mData;
>       }
> @@ -99,11 +138,14 @@
>               return mInserter;
>       }
>       
> +     public Date getDateOfInsertion() {
> +             return mDateOfInsertion;
> +     }
> +     
>       public long getValidUntilTime() {
>               return mValidUntilTime;
>       }
>       
> -     
>       public void store(ObjectContainer db) {
>               db.store(this);
>               db.commit();
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20081112/dedc9000/attachment.pgp>

Reply via email to