diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-05-30 18:47:17 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-05-30 18:47:17 +0200 |
commit | adef29b3ed00afd42669ae35a73951c59f08a41b (patch) | |
tree | c8d6c7f60716c551b587aed7a1efe0d6e756833f /src/datacache/test_datacache.c | |
parent | f5a18b7466f342ac9624adcdb65f104aef8ecb5e (diff) | |
download | gnunet-adef29b3ed00afd42669ae35a73951c59f08a41b.tar.gz gnunet-adef29b3ed00afd42669ae35a73951c59f08a41b.zip |
add proximity considerations to datacache
Diffstat (limited to 'src/datacache/test_datacache.c')
-rw-r--r-- | src/datacache/test_datacache.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/datacache/test_datacache.c b/src/datacache/test_datacache.c index 79e6b6d74..c4d59c3cc 100644 --- a/src/datacache/test_datacache.c +++ b/src/datacache/test_datacache.c | |||
@@ -87,7 +87,10 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
87 | { | 87 | { |
88 | GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n); | 88 | GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n); |
89 | ASSERT (GNUNET_OK == | 89 | ASSERT (GNUNET_OK == |
90 | GNUNET_DATACACHE_put (h, &k, sizeof (struct GNUNET_HashCode), | 90 | GNUNET_DATACACHE_put (h, |
91 | &k, | ||
92 | GNUNET_YES, | ||
93 | sizeof (struct GNUNET_HashCode), | ||
91 | (const char *) &n, 1 + i % 16, exp, | 94 | (const char *) &n, 1 + i % 16, exp, |
92 | 0, NULL)); | 95 | 0, NULL)); |
93 | k = n; | 96 | k = n; |
@@ -103,7 +106,10 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
103 | memset (&k, 42, sizeof (struct GNUNET_HashCode)); | 106 | memset (&k, 42, sizeof (struct GNUNET_HashCode)); |
104 | GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n); | 107 | GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n); |
105 | ASSERT (GNUNET_OK == | 108 | ASSERT (GNUNET_OK == |
106 | GNUNET_DATACACHE_put (h, &k, sizeof (struct GNUNET_HashCode), | 109 | GNUNET_DATACACHE_put (h, |
110 | &k, | ||
111 | GNUNET_YES, | ||
112 | sizeof (struct GNUNET_HashCode), | ||
107 | (const char *) &n, 792, | 113 | (const char *) &n, 792, |
108 | GNUNET_TIME_UNIT_FOREVER_ABS, | 114 | GNUNET_TIME_UNIT_FOREVER_ABS, |
109 | 0, NULL)); | 115 | 0, NULL)); |