aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_batch_withdraw.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-09-24 11:51:47 +0200
committerChristian Grothoff <christian@grothoff.org>2023-09-24 11:51:47 +0200
commit7a3b1c6b88a86ccb98a9d60675f8f0c1a7e3fe45 (patch)
tree7a89527ea1551a4b97897db01bff1c942825811d /src/testing/testing_api_cmd_batch_withdraw.c
parent4c220dce4d5ef33e00e937e236a744324af9dcf0 (diff)
downloadexchange-7a3b1c6b88a86ccb98a9d60675f8f0c1a7e3fe45.tar.xz
fix various FIXMEs
Diffstat (limited to 'src/testing/testing_api_cmd_batch_withdraw.c')
-rw-r--r--src/testing/testing_api_cmd_batch_withdraw.c31
1 files changed, 12 insertions, 19 deletions
diff --git a/src/testing/testing_api_cmd_batch_withdraw.c b/src/testing/testing_api_cmd_batch_withdraw.c
index 41c74c3e2..f0b9dcad8 100644
--- a/src/testing/testing_api_cmd_batch_withdraw.c
+++ b/src/testing/testing_api_cmd_batch_withdraw.c
@@ -460,14 +460,17 @@ TALER_TESTING_cmd_batch_withdraw (const char *label,
ws->expected_response_code = expected_response_code;
cnt = 1;
- va_start (ap, amount);
- while (NULL != (va_arg (ap, const char *)))
+ va_start (ap,
+ amount);
+ while (NULL != (va_arg (ap,
+ const char *)))
cnt++;
ws->num_coins = cnt;
ws->coins = GNUNET_new_array (cnt,
struct CoinState);
va_end (ap);
- va_start (ap, amount);
+ va_start (ap,
+ amount);
for (unsigned int i = 0; i<ws->num_coins; i++)
{
struct CoinState *cs = &ws->coins[i];
@@ -481,21 +484,10 @@ TALER_TESTING_cmd_batch_withdraw (const char *label,
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK,
&seed,
sizeof(seed));
-
- if (GNUNET_OK !=
- TALER_age_restriction_commit (
- &mask,
- age,
- &seed,
- &cs->age_commitment_proof))
- {
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Failed to generate age commitment for age %d at %s\n",
- age,
- label);
- GNUNET_assert (0);
- }
-
+ TALER_age_restriction_commit (&mask,
+ age,
+ &seed,
+ &cs->age_commitment_proof);
TALER_age_commitment_hash (&cs->age_commitment_proof.commitment,
&cs->h_age_commitment);
}
@@ -511,7 +503,8 @@ TALER_TESTING_cmd_batch_withdraw (const char *label,
GNUNET_assert (0);
}
/* move on to next vararg! */
- amount = va_arg (ap, const char *);
+ amount = va_arg (ap,
+ const char *);
}
GNUNET_assert (NULL == amount);
va_end (ap);