diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2023-07-20 18:13:48 +0200 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2023-07-20 18:13:48 +0200 |
commit | 430bb0624ae60e78c3e9855bd7827cc407471871 (patch) | |
tree | d35009892e5c07069e112fe36735f4832df32b12 /src/testing/testing_api_cmd_batch_withdraw.c | |
parent | c424cf99abf8caae1106fe778c251aa469e0a308 (diff) | |
download | exchange-430bb0624ae60e78c3e9855bd7827cc407471871.tar.xz |
[age-withdraw] Added testing commands for age-withdraw and -reveal
Implemented
- TALER_TESTING_cmd_age_withdraw
- TALER_TESTING_cmd_age_withdraw_reveal
Note: No test is using those commands yet.
Diffstat (limited to 'src/testing/testing_api_cmd_batch_withdraw.c')
-rw-r--r-- | src/testing/testing_api_cmd_batch_withdraw.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/testing/testing_api_cmd_batch_withdraw.c b/src/testing/testing_api_cmd_batch_withdraw.c index da43a9aa9..41c74c3e2 100644 --- a/src/testing/testing_api_cmd_batch_withdraw.c +++ b/src/testing/testing_api_cmd_batch_withdraw.c @@ -23,6 +23,7 @@ * @author Marcello Stanisci */ #include "platform.h" +#include "taler_exchange_service.h" #include "taler_json_lib.h" #include <microhttpd.h> #include <gnunet/gnunet_curl_lib.h> @@ -217,7 +218,7 @@ reserve_batch_withdraw_cb (void *cls, /* nothing to check */ break; case MHD_HTTP_CONFLICT: - /* nothing to check */ + /* TODO[oec]: Check if age-requirement is the reason */ break; case MHD_HTTP_GONE: /* theoretically could check that the key was actually */ @@ -250,6 +251,7 @@ batch_withdraw_run (void *cls, struct TALER_TESTING_Interpreter *is) { struct BatchWithdrawState *ws = cls; + const struct TALER_EXCHANGE_Keys *keys = TALER_TESTING_get_keys (is); const struct TALER_ReservePrivateKeyP *rp; const struct TALER_TESTING_Command *create_reserve; const struct TALER_EXCHANGE_DenomPublicKey *dpk; @@ -292,7 +294,7 @@ batch_withdraw_run (void *cls, struct TALER_EXCHANGE_WithdrawCoinInput *wci = &wcis[i]; TALER_planchet_master_setup_random (&cs->ps); - dpk = TALER_TESTING_find_pk (TALER_TESTING_get_keys (is), + dpk = TALER_TESTING_find_pk (keys, &cs->amount, ws->age > 0); if (NULL == dpk) @@ -321,7 +323,7 @@ batch_withdraw_run (void *cls, ws->wsh = TALER_EXCHANGE_batch_withdraw ( TALER_TESTING_interpreter_get_context (is), TALER_TESTING_get_exchange_url (is), - TALER_TESTING_get_keys (is), + keys, rp, ws->num_coins, wcis, |