(hashcash-generate-payment)
authorSimon Josefsson <jas@extundo.com>
Tue, 28 Sep 2004 14:38:36 +0000 (14:38 +0000)
committerSimon Josefsson <jas@extundo.com>
Tue, 28 Sep 2004 14:38:36 +0000 (14:38 +0000)
(hashcash-check-payment): Use error.

lisp/ChangeLog
lisp/hashcash.el

index bba9174..17f6a1d 100644 (file)
@@ -1,3 +1,8 @@
+2004-09-28  Simon Josefsson  <jas@extundo.com>
+
+       * hashcash.el (hashcash-generate-payment)
+       (hashcash-check-payment): Use error.
+
 2004-09-28  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * gnus-registry.el (gnus-registry-split-fancy-with-parent): use
 2004-09-28  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * gnus-registry.el (gnus-registry-split-fancy-with-parent): use
index d87c5cd..fd9190a 100644 (file)
@@ -1,7 +1,7 @@
 ;;; hashcash.el --- Add hashcash payments to email
 
 ;; Copyright (C) 1997--2002 Paul E. Foley
 ;;; hashcash.el --- Add hashcash payments to email
 
 ;; Copyright (C) 1997--2002 Paul E. Foley
-;; Copyright (C) 2003 Free Software Foundation
+;; Copyright (C) 2003, 2004 Free Software Foundation
 
 ;; Maintainer: Paul Foley <mycroft@actrix.gen.nz>
 ;; Keywords: mail, hashcash
 
 ;; Maintainer: Paul Foley <mycroft@actrix.gen.nz>
 ;; Keywords: mail, hashcash
@@ -111,7 +111,7 @@ is used instead.")
 
 (defun hashcash-generate-payment (str val)
   "Generate a hashcash payment by finding a VAL-bit collison on STR."
 
 (defun hashcash-generate-payment (str val)
   "Generate a hashcash payment by finding a VAL-bit collison on STR."
-  (if (and (> val 0) 
+  (if (and (> val 0)
           hashcash-path)
       (save-excursion
        (set-buffer (get-buffer-create " *hashcash*"))
           hashcash-path)
       (save-excursion
        (set-buffer (get-buffer-create " *hashcash*"))
@@ -120,10 +120,7 @@ is used instead.")
                      "-m" "-q" "-b" (number-to-string val) str)
        (goto-char (point-min))
        (hashcash-token-substring))
                      "-m" "-q" "-b" (number-to-string val) str)
        (goto-char (point-min))
        (hashcash-token-substring))
-    (progn
-      (message "No hashcash binary found")
-      (sleep-for 1)
-      nil)))
+    (error "No `hashcash' binary found")))
 
 (defun hashcash-check-payment (token str val)
   "Check the validity of a hashcash payment."
 
 (defun hashcash-check-payment (token str val)
   "Check the validity of a hashcash payment."
@@ -133,10 +130,7 @@ is used instead.")
                           "-b" (number-to-string val)
                           "-r" str
                           token))
                           "-b" (number-to-string val)
                           "-r" str
                           token))
-    (progn
-      (message "No hashcash binary found")
-      (sleep-for 1)
-      nil)))
+    (error "No `hashcash' binary found")))
 
 (defun hashcash-version (token)
   "Find the format version of a hashcash token."
 
 (defun hashcash-version (token)
   "Find the format version of a hashcash token."