diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-02-26 23:39:29 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-02-26 23:39:29 +0100 |
commit | 82242cae3bb6313ee10df20570e4c14627828033 (patch) | |
tree | c628b5323c1ec8cbf0915e04bb7a1fa7864d7ea9 /src/block | |
parent | cc8f37a834298d95c233769d19eb9cd17e3dbcfd (diff) | |
download | gnunet-82242cae3bb6313ee10df20570e4c14627828033.tar.gz gnunet-82242cae3bb6313ee10df20570e4c14627828033.zip |
add validation for inner consensus element
The nested block validation requires the block context, and thus the
evaluate callback not also receives the block context.
Diffstat (limited to 'src/block')
-rw-r--r-- | src/block/block.c | 1 | ||||
-rw-r--r-- | src/block/plugin_block_template.c | 2 | ||||
-rw-r--r-- | src/block/plugin_block_test.c | 2 |
3 files changed, 5 insertions, 0 deletions
diff --git a/src/block/block.c b/src/block/block.c index 23caacd38..d6e61acf6 100644 --- a/src/block/block.c +++ b/src/block/block.c | |||
@@ -351,6 +351,7 @@ GNUNET_BLOCK_evaluate (struct GNUNET_BLOCK_Context *ctx, | |||
351 | if (NULL == plugin) | 351 | if (NULL == plugin) |
352 | return GNUNET_BLOCK_EVALUATION_TYPE_NOT_SUPPORTED; | 352 | return GNUNET_BLOCK_EVALUATION_TYPE_NOT_SUPPORTED; |
353 | return plugin->evaluate (plugin->cls, | 353 | return plugin->evaluate (plugin->cls, |
354 | ctx, | ||
354 | type, | 355 | type, |
355 | group, | 356 | group, |
356 | eo, | 357 | eo, |
diff --git a/src/block/plugin_block_template.c b/src/block/plugin_block_template.c index b714b6858..2edca17ec 100644 --- a/src/block/plugin_block_template.c +++ b/src/block/plugin_block_template.c | |||
@@ -95,6 +95,7 @@ block_plugin_template_create_group (void *cls, | |||
95 | * request evaluation, simply pass "NULL" for the reply_block. | 95 | * request evaluation, simply pass "NULL" for the reply_block. |
96 | * | 96 | * |
97 | * @param cls closure | 97 | * @param cls closure |
98 | * @param ctx context | ||
98 | * @param type block type | 99 | * @param type block type |
99 | * @param group block group to use | 100 | * @param group block group to use |
100 | * @param eo control flags | 101 | * @param eo control flags |
@@ -107,6 +108,7 @@ block_plugin_template_create_group (void *cls, | |||
107 | */ | 108 | */ |
108 | static enum GNUNET_BLOCK_EvaluationResult | 109 | static enum GNUNET_BLOCK_EvaluationResult |
109 | block_plugin_template_evaluate (void *cls, | 110 | block_plugin_template_evaluate (void *cls, |
111 | struct GNUNET_BLOCK_Context *ctx, | ||
110 | enum GNUNET_BLOCK_Type type, | 112 | enum GNUNET_BLOCK_Type type, |
111 | struct GNUNET_BLOCK_Group *group, | 113 | struct GNUNET_BLOCK_Group *group, |
112 | enum GNUNET_BLOCK_EvaluationOptions eo, | 114 | enum GNUNET_BLOCK_EvaluationOptions eo, |
diff --git a/src/block/plugin_block_test.c b/src/block/plugin_block_test.c index b9f71cacb..e359acd7f 100644 --- a/src/block/plugin_block_test.c +++ b/src/block/plugin_block_test.c | |||
@@ -93,6 +93,7 @@ block_plugin_test_create_group (void *cls, | |||
93 | * request evaluation, simply pass "NULL" for the reply_block. | 93 | * request evaluation, simply pass "NULL" for the reply_block. |
94 | * | 94 | * |
95 | * @param cls closure | 95 | * @param cls closure |
96 | * @param ctx block context | ||
96 | * @param type block type | 97 | * @param type block type |
97 | * @param group group to check against | 98 | * @param group group to check against |
98 | * @param eo control flags | 99 | * @param eo control flags |
@@ -105,6 +106,7 @@ block_plugin_test_create_group (void *cls, | |||
105 | */ | 106 | */ |
106 | static enum GNUNET_BLOCK_EvaluationResult | 107 | static enum GNUNET_BLOCK_EvaluationResult |
107 | block_plugin_test_evaluate (void *cls, | 108 | block_plugin_test_evaluate (void *cls, |
109 | struct GNUNET_BLOCK_Context *ctx, | ||
108 | enum GNUNET_BLOCK_Type type, | 110 | enum GNUNET_BLOCK_Type type, |
109 | struct GNUNET_BLOCK_Group *group, | 111 | struct GNUNET_BLOCK_Group *group, |
110 | enum GNUNET_BLOCK_EvaluationOptions eo, | 112 | enum GNUNET_BLOCK_EvaluationOptions eo, |