123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- (use-modules (rehash)
- (gnu gnunet configuration)
- (srfi srfi-64))
- (define test-config #f)
- (define s #f)
- (test-begin "test-rehash-smoke")
- (set! test-config (load-configuration "testconf.conf"))
- (set! s (open-rehash-service test-config))
- (define h1 (bytevector->hash HASH_SHA256 #vu8(0 1) 0 2))
- (define h2 (bytevector->hash HASH_SHA256 #vu8(2 1) 0 2))
- (define s1 (store-hash! s h1 h2
- #:expiration-time (expt 2 48)
- #:anonymity-level 0))
- (define s2 (store-hash! s h2 h1
- #:expiration-time 345678
- #:anonymity-level 0))
- (store-abort! s1)
- (define q1 (query! s h1 HASH_SHA3_512
- #:anonymity-level 0
- #:options 0
- #:when-found display))
- (store-abort! s2)
- (query-abort! q1)
- (close-rehash-service s)
- (test-end "test-rehash-smoke")
|