aboutsummaryrefslogtreecommitdiff
path: root/src/block/plugin_block_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/block/plugin_block_test.c')
-rw-r--r--src/block/plugin_block_test.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/block/plugin_block_test.c b/src/block/plugin_block_test.c
index 615f1571b..e359acd7f 100644
--- a/src/block/plugin_block_test.c
+++ b/src/block/plugin_block_test.c
@@ -61,8 +61,25 @@ block_plugin_test_create_group (void *cls,
61 size_t raw_data_size, 61 size_t raw_data_size,
62 va_list va) 62 va_list va)
63{ 63{
64 unsigned int bf_size;
65 const char *guard;
66
67 guard = va_arg (va, const char *);
68 if (0 == strcmp (guard,
69 "seen-set-size"))
70 bf_size = GNUNET_BLOCK_GROUP_compute_bloomfilter_size (va_arg (va, unsigned int),
71 BLOOMFILTER_K);
72 else if (0 == strcmp (guard,
73 "filter-size"))
74 bf_size = va_arg (va, unsigned int);
75 else
76 {
77 GNUNET_break (0);
78 bf_size = TEST_BF_SIZE;
79 }
80 GNUNET_break (NULL == va_arg (va, const char *));
64 return GNUNET_BLOCK_GROUP_bf_create (cls, 81 return GNUNET_BLOCK_GROUP_bf_create (cls,
65 TEST_BF_SIZE, 82 bf_size,
66 BLOOMFILTER_K, 83 BLOOMFILTER_K,
67 type, 84 type,
68 nonce, 85 nonce,
@@ -76,6 +93,7 @@ block_plugin_test_create_group (void *cls,
76 * request evaluation, simply pass "NULL" for the reply_block. 93 * request evaluation, simply pass "NULL" for the reply_block.
77 * 94 *
78 * @param cls closure 95 * @param cls closure
96 * @param ctx block context
79 * @param type block type 97 * @param type block type
80 * @param group group to check against 98 * @param group group to check against
81 * @param eo control flags 99 * @param eo control flags
@@ -88,6 +106,7 @@ block_plugin_test_create_group (void *cls,
88 */ 106 */
89static enum GNUNET_BLOCK_EvaluationResult 107static enum GNUNET_BLOCK_EvaluationResult
90block_plugin_test_evaluate (void *cls, 108block_plugin_test_evaluate (void *cls,
109 struct GNUNET_BLOCK_Context *ctx,
91 enum GNUNET_BLOCK_Type type, 110 enum GNUNET_BLOCK_Type type,
92 struct GNUNET_BLOCK_Group *group, 111 struct GNUNET_BLOCK_Group *group,
93 enum GNUNET_BLOCK_EvaluationOptions eo, 112 enum GNUNET_BLOCK_EvaluationOptions eo,