From 5f57dbbc7b1e1ed21fff24daa537b949727b7966 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 19 Dec 2021 12:12:50 +0100 Subject: -introduce new types for tip identifiers and tip pickups --- src/testing/testing_api_cmd_get_reserve.c | 2 +- src/testing/testing_api_cmd_get_tips.c | 2 +- src/testing/testing_api_cmd_merchant_get_tip.c | 2 +- src/testing/testing_api_cmd_tip_authorize.c | 7 +++---- src/testing/testing_api_cmd_tip_pickup.c | 2 +- src/testing/testing_api_cmd_wallet_get_tip.c | 2 +- 6 files changed, 8 insertions(+), 9 deletions(-) (limited to 'src/testing') diff --git a/src/testing/testing_api_cmd_get_reserve.c b/src/testing/testing_api_cmd_get_reserve.c index 95d0c3a8..03b6a071 100644 --- a/src/testing/testing_api_cmd_get_reserve.c +++ b/src/testing/testing_api_cmd_get_reserve.c @@ -139,7 +139,7 @@ get_reserve_cb (void *cls, tip_cmd = TALER_TESTING_interpreter_lookup_command (grs->is, grs->tips[i]); { - const struct GNUNET_HashCode *tip_id; + const struct TALER_TipIdentifierP *tip_id; if (GNUNET_OK != TALER_TESTING_get_trait_tip_id (tip_cmd, diff --git a/src/testing/testing_api_cmd_get_tips.c b/src/testing/testing_api_cmd_get_tips.c index 9b9a4671..89a82202 100644 --- a/src/testing/testing_api_cmd_get_tips.c +++ b/src/testing/testing_api_cmd_get_tips.c @@ -121,7 +121,7 @@ get_tips_cb (void *cls, gts->is, gts->tips[i]); { - const struct GNUNET_HashCode *tip_id; + const struct TALER_TipIdentifierP *tip_id; if (GNUNET_OK != TALER_TESTING_get_trait_tip_id (tip_cmd, diff --git a/src/testing/testing_api_cmd_merchant_get_tip.c b/src/testing/testing_api_cmd_merchant_get_tip.c index 6b247e75..a4841da1 100644 --- a/src/testing/testing_api_cmd_merchant_get_tip.c +++ b/src/testing/testing_api_cmd_merchant_get_tip.c @@ -269,7 +269,7 @@ merchant_get_tip_run (void *cls, { struct MerchantTipGetState *tgs = cls; const struct TALER_TESTING_Command *tip_cmd; - const struct GNUNET_HashCode *tip_id; + const struct TALER_TipIdentifierP *tip_id; tip_cmd = TALER_TESTING_interpreter_lookup_command (is, tgs->tip_reference); diff --git a/src/testing/testing_api_cmd_tip_authorize.c b/src/testing/testing_api_cmd_tip_authorize.c index cc83605f..3d6893d9 100644 --- a/src/testing/testing_api_cmd_tip_authorize.c +++ b/src/testing/testing_api_cmd_tip_authorize.c @@ -76,7 +76,7 @@ struct TipAuthorizeState /** * The tip id; set when the CMD succeeds. */ - struct GNUNET_HashCode tip_id; + struct TALER_TipIdentifierP tip_id; /** * Expiration date for this tip. @@ -134,7 +134,7 @@ do_retry (void *cls); static void tip_authorize_cb (void *cls, const struct TALER_MERCHANT_HttpResponse *hr, - struct GNUNET_HashCode *tip_id, + struct TALER_TipIdentifierP *tip_id, const char *taler_tip_uri, struct GNUNET_TIME_Timestamp expiration) { @@ -299,8 +299,7 @@ tip_authorize_fake_run (void *cls, /* Make up a tip id. */ GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK, &tas->tip_id, - sizeof (struct GNUNET_HashCode)); - + sizeof (struct TALER_TipIdentifierP)); TALER_TESTING_interpreter_next (is); } diff --git a/src/testing/testing_api_cmd_tip_pickup.c b/src/testing/testing_api_cmd_tip_pickup.c index cd73c53d..3c01b416 100644 --- a/src/testing/testing_api_cmd_tip_pickup.c +++ b/src/testing/testing_api_cmd_tip_pickup.c @@ -187,7 +187,7 @@ tip_pickup_run (void *cls, unsigned int num_planchets; const struct TALER_TESTING_Command *replay_cmd; const struct TALER_TESTING_Command *authorize_cmd; - const struct GNUNET_HashCode *tip_id; + const struct TALER_TipIdentifierP *tip_id; tps->is = is; tps->exchange_url = TALER_EXCHANGE_get_base_url (is->exchange); diff --git a/src/testing/testing_api_cmd_wallet_get_tip.c b/src/testing/testing_api_cmd_wallet_get_tip.c index 7e13acc9..f7786973 100644 --- a/src/testing/testing_api_cmd_wallet_get_tip.c +++ b/src/testing/testing_api_cmd_wallet_get_tip.c @@ -167,7 +167,7 @@ wallet_get_tip_run (void *cls, { struct WalletTipGetState *tgs = cls; const struct TALER_TESTING_Command *tip_cmd; - const struct GNUNET_HashCode *tip_id; + const struct TALER_TipIdentifierP *tip_id; tip_cmd = TALER_TESTING_interpreter_lookup_command (is, tgs->tip_reference); -- cgit v1.2.3