[hashcash] Re: Database purge query

  • From: BiKiKii <mail2news-admin@xxxxxxxxxxxxxx>
  • To: hashcash@xxxxxxxxxxxxx
  • Date: 21 Aug 2006 21:31:18 -0000

On Mon, 21 Aug 2006, Dr Adam Back wrote:

Hello,

Thank you. This is the information needed:

>Note also for the -e to apply to the purge, that option must come
>before the -p option.  (Otherwise it applies to the -c etc).
>

Rewriting the command with the -expirey before the -purge
(and changing purge to 1 day for testing)...

hashcash -cd -X -i -q -e 14d -p 1d -b 27 -r bikikii -f hashcash.sdb < "%x%"

has the desired result:

last_purged 060821203814
1:27:060806:bikikii::iYNtHsxuIOl3C9B1:0000000005Gj1R 1209600
1:27:060806:bikikii::Ezp/CKbBgXs1YJLM:000000000A4PRp 1209600
1:27:060807:bikikii::doOjfbu8jzc4eCLq:0000000005TxYf 1209600

Now back to 7 days for -purge and see what happens next week.

Ciao!

BiKiKii

----- Original Message ---------------
>Seems to work for me.  Bear in mind that there is a default grace
>period of 2days, so stamps will not actually exire until 16 days after
>issue if you say -e 14d.  You can override that with -g 0 if you dont
>want any grace period.
>
>Note also for the -e to apply to the purge, that option must come
>before the -p option.  (Otherwise it applies to the -c etc).
>
>Using your stamp file if I do this:
>
>hashcash -g 0 -p now -t 060731
>
>then the stamp file afterwards holds:
>
>last_purged 060730230000
>1:27:060717:bikikii::ATSrpfAr7W1prZUO:00000000055kh+ 1209600
>
>(if no -e is given the e value given at time of checking (-c) is
>stored in the db and used.  ie the 1209600 == 14days.)
>
>On Fri, Aug 18, 2006 at 08:25:10PM -0500, BiKiKii wrote:
>> [hashcash-1.22 W32 console]
>> 
>> Is there something wrong with the below commandline?
>> The commandline is abbreviated but all the options are listed.
>> The option of "-f" is used as the database is located at a different
>> drive:\directory location than the executable. 
>> 
>> Too many or incompatible options?
>> 
>> I expect it to purge the database of expired stamps.
>> Stamps that are older than 14 days. But it only purges
>> those stamps older than 28 days.
>> 
>> 
>> hashcash -cd -X -i -q -p 7d -e 14d -b 27 -r bikikii -f hashcash.sdb < "%x%"
>> 
>> last_purged 060812095308
>> 1:27:060716:bikikii::LSQ1tRGm+Opf6Ish:0000000007QTsq 1209600
>> 1:27:060717:bikikii::ATSrpfAr7W1prZUO:00000000055kh+ 1209600
>> 1:27:060716:bikikii::/KM9u7rGJMXBr0wW:0X63s 1209600

Other related posts: