aboutsummaryrefslogtreecommitdiff
path: root/test_brandt.c
diff options
context:
space:
mode:
authorMarkus Teich <markus.teich@stusta.mhn.de>2016-12-02 12:53:54 +0100
committerMarkus Teich <markus.teich@stusta.mhn.de>2016-12-02 12:53:54 +0100
commite66cbbe44f3708e6d6a30b216035bcccfc8e7207 (patch)
tree5329f963c2eee3af18976862cdfdf9e344dfd109 /test_brandt.c
parent64689a9083fd11a1e482cc86c0417183cdc76ece (diff)
move ecdlogctx passing to _join()/_new() functions
Diffstat (limited to 'test_brandt.c')
-rw-r--r--test_brandt.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/test_brandt.c b/test_brandt.c
index 47f3711..afc178a 100644
--- a/test_brandt.c
+++ b/test_brandt.c
@@ -50,7 +50,8 @@ struct testcase {
};
-static struct testcase tcase;
+static struct testcase tcase;
+static struct GNUNET_CRYPTO_EccDlogContext *edc;
static struct BRANDT_Result *
@@ -330,7 +331,8 @@ run_auction (void *arg)
GNUNET_TIME_UNIT_MINUTES,
tcase.k, /* number of prizes */
tcase.m, /* m */
- tcase.outcome_public); /* outcome public */
+ tcase.outcome_public, /* outcome public */
+ tcase.outcome_public ? edc : NULL);
if (!tcase.ad[tcase.n])
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "BRANDT_new() failed.\n");
@@ -345,7 +347,8 @@ run_auction (void *arg)
&tcase.id[i],
desc,
desc_len,
- tcase.bids[i]); /* bid */
+ tcase.bids[i], /* bid */
+ tcase.outcome_public ? edc : NULL);
if (!tcase.ad[i])
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "BRANDT_join() failed.\n");
@@ -439,14 +442,13 @@ test_auction (uint16_t n,
int
main (int argc, char *argv[])
{
- int ret = 0;
- struct GNUNET_CRYPTO_EccDlogContext *edc;
+ int ret = 0;
if (GNUNET_OK != GNUNET_log_setup ("test_brandt", "WARNING", NULL))
return 1;
edc = GNUNET_CRYPTO_ecc_dlog_prepare (1024, 16);
- BRANDT_init (edc);
+ BRANDT_init ();
ret |= 0 ||
// zero bidders