[hashcash] Re: purging double spend db

  • From: Adam Back <adam@xxxxxxxxxxxxxxx>
  • To: hashcash@xxxxxxxxxxxxx
  • Date: Fri, 8 Oct 2004 02:46:07 -0400

The -t flag is really just for testing (ie what would happen if the
time were xxx -t xxx; time has an absolute format (YYMMDD[hhmm{ss]]),
and a relative format [+|-]-n[Y|y|M|d|h|m|s|w] eg +1w means 1 week
later than current time.

Stamps by default expire after 28days.  You specify the expiry period
of a stamp when you spend it with the -e flag.  Format -e
n[Y|y|M|d|h|m|s|w].

Note the -g n[Y|y|M|d|h|m|s|w] also comes into this calculation.  By
default -g (grace period to account for clock error) is 48 hrs = 2
days.  So stamps are expired after 30 days (and not default 28 days)
and accepted up to 2 days older than you would expect and 2 days into
the future.


So expiry control is relative to what you said when you spent the
stamp.  This allows purging to purge lots of different expiry periods
all at the same time.


If this is all inconvenient for what you are doing or anyway for
completeness of control I maybe could make -e available with -p and
make it purge all stamps (or those matched by the optional -j pattern)
as if they were originally given expiry period given with -e.  Ie the
-p flag given with -e overrides the one given with -cd.

Adam

On Thu, Oct 07, 2004 at 09:54:50PM -0400, Atom 'Smasher' wrote:
> using "-p" to purge the double spend db, i'm having a hard time getting 
> the "-t" option to do what i want. can anyone post examples of how to 
> purge stamps that are N days old?

Other related posts: