aboutsummaryrefslogtreecommitdiff
path: root/src/datastore/test_datastore_api_management.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/datastore/test_datastore_api_management.c')
-rw-r--r--src/datastore/test_datastore_api_management.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/datastore/test_datastore_api_management.c b/src/datastore/test_datastore_api_management.c
index 9a3e5446b..de4dc657f 100644
--- a/src/datastore/test_datastore_api_management.c
+++ b/src/datastore/test_datastore_api_management.c
@@ -58,7 +58,6 @@ struct CpsRunContext
58 const struct GNUNET_CONFIGURATION_Handle *cfg; 58 const struct GNUNET_CONFIGURATION_Handle *cfg;
59 void *data; 59 void *data;
60 enum RunPhase phase; 60 enum RunPhase phase;
61 uint64_t offset;
62}; 61};
63 62
64 63
@@ -159,7 +158,6 @@ check_value (void *cls, const struct GNUNET_HashCode * key, size_t size,
159 GNUNET_assert (priority == get_priority (i)); 158 GNUNET_assert (priority == get_priority (i));
160 GNUNET_assert (anonymity == get_anonymity (i)); 159 GNUNET_assert (anonymity == get_anonymity (i));
161 GNUNET_assert (expiration.abs_value_us == get_expiration (i).abs_value_us); 160 GNUNET_assert (expiration.abs_value_us == get_expiration (i).abs_value_us);
162 crc->offset++;
163 crc->i--; 161 crc->i--;
164 if (crc->i == 0) 162 if (crc->i == 0)
165 crc->phase = RP_DONE; 163 crc->phase = RP_DONE;
@@ -221,8 +219,13 @@ run_continuation (void *cls)
221 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Executing `%s' number %u\n", "GET", 219 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Executing `%s' number %u\n", "GET",
222 crc->i); 220 crc->i);
223 GNUNET_CRYPTO_hash (&crc->i, sizeof (int), &crc->key); 221 GNUNET_CRYPTO_hash (&crc->i, sizeof (int), &crc->key);
224 GNUNET_DATASTORE_get_key (datastore, crc->offset++, &crc->key, 222 GNUNET_DATASTORE_get_key (datastore,
225 get_type (crc->i), 1, 1, 223 0,
224 false,
225 &crc->key,
226 get_type (crc->i),
227 1,
228 1,
226 &check_value, 229 &check_value,
227 crc); 230 crc);
228 break; 231 break;
@@ -230,8 +233,13 @@ run_continuation (void *cls)
230 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Executing `%s' number %u\n", "GET(f)", 233 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Executing `%s' number %u\n", "GET(f)",
231 crc->i); 234 crc->i);
232 GNUNET_CRYPTO_hash (&crc->i, sizeof (int), &crc->key); 235 GNUNET_CRYPTO_hash (&crc->i, sizeof (int), &crc->key);
233 GNUNET_DATASTORE_get_key (datastore, crc->offset++, &crc->key, 236 GNUNET_DATASTORE_get_key (datastore,
234 get_type (crc->i), 1, 1, 237 0,
238 false,
239 &crc->key,
240 get_type (crc->i),
241 1,
242 1,
235 &check_nothing, 243 &check_nothing,
236 crc); 244 crc);
237 break; 245 break;