summaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-12-19 12:12:50 +0100
committerChristian Grothoff <christian@grothoff.org>2021-12-19 12:12:50 +0100
commit5f57dbbc7b1e1ed21fff24daa537b949727b7966 (patch)
tree76b0cbdb74cea37e85363de794ae2580808fe866 /src/testing
parent7fc151fbb8080395579888e1cb384ccd35a36daa (diff)
downloadmerchant-5f57dbbc7b1e1ed21fff24daa537b949727b7966.tar.gz
merchant-5f57dbbc7b1e1ed21fff24daa537b949727b7966.tar.bz2
merchant-5f57dbbc7b1e1ed21fff24daa537b949727b7966.zip
-introduce new types for tip identifiers and tip pickups
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/testing_api_cmd_get_reserve.c2
-rw-r--r--src/testing/testing_api_cmd_get_tips.c2
-rw-r--r--src/testing/testing_api_cmd_merchant_get_tip.c2
-rw-r--r--src/testing/testing_api_cmd_tip_authorize.c7
-rw-r--r--src/testing/testing_api_cmd_tip_pickup.c2
-rw-r--r--src/testing/testing_api_cmd_wallet_get_tip.c2
6 files changed, 8 insertions, 9 deletions
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);