(hashcash-generate-payment)
[gnus] / lisp / hashcash.el
index d87c5cd..fd9190a 100644 (file)
@@ -1,7 +1,7 @@
 ;;; 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
@@ -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."
-  (if (and (> val 0) 
+  (if (and (> val 0)
           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))
-    (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."
@@ -133,10 +130,7 @@ is used instead.")
                           "-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."