diff options
22 files changed, 64 insertions, 67 deletions
diff --git a/src/backend/taler-merchant-httpd_get-tips-ID.c b/src/backend/taler-merchant-httpd_get-tips-ID.c index 4b4b2858..f427b168 100644 --- a/src/backend/taler-merchant-httpd_get-tips-ID.c +++ b/src/backend/taler-merchant-httpd_get-tips-ID.c @@ -30,7 +30,7 @@ char * TMH_make_taler_tip_uri (struct MHD_Connection *con, - const struct GNUNET_HashCode *tip_id, + const struct TALER_TipIdentifierP *tip_id, const char *instance_id) { const char *host; @@ -92,7 +92,7 @@ TMH_make_taler_tip_uri (struct MHD_Connection *con, char * TMH_make_tip_status_url (struct MHD_Connection *con, - const struct GNUNET_HashCode *tip_id, + const struct TALER_TipIdentifierP *tip_id, const char *instance_id) { const char *host; @@ -155,7 +155,7 @@ TMH_get_tips_ID (const struct TMH_RequestHandler *rh, struct MHD_Connection *connection, struct TMH_HandlerContext *hc) { - struct GNUNET_HashCode tip_id; + struct TALER_TipIdentifierP tip_id; enum GNUNET_DB_QueryStatus qs; struct TALER_Amount total_authorized; struct TALER_Amount total_picked_up; @@ -165,7 +165,7 @@ TMH_get_tips_ID (const struct TMH_RequestHandler *rh, if (GNUNET_OK != GNUNET_CRYPTO_hash_from_string (hc->infix, - &tip_id)) + &tip_id.hash)) { /* tip_id has wrong encoding */ GNUNET_break_op (0); diff --git a/src/backend/taler-merchant-httpd_get-tips-ID.h b/src/backend/taler-merchant-httpd_get-tips-ID.h index 725d305c..bd50da6f 100644 --- a/src/backend/taler-merchant-httpd_get-tips-ID.h +++ b/src/backend/taler-merchant-httpd_get-tips-ID.h @@ -34,7 +34,7 @@ */ char * TMH_make_taler_tip_uri (struct MHD_Connection *con, - const struct GNUNET_HashCode *tip_id, + const struct TALER_TipIdentifierP *tip_id, const char *instance_id); /** @@ -48,7 +48,7 @@ TMH_make_taler_tip_uri (struct MHD_Connection *con, */ char * TMH_make_tip_status_url (struct MHD_Connection *con, - const struct GNUNET_HashCode *tip_id, + const struct TALER_TipIdentifierP *tip_id, const char *instance_id); /** diff --git a/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c b/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c index c60ba021..03b232d4 100644 --- a/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c +++ b/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c @@ -144,13 +144,13 @@ struct PickupContext /** * Which tip is being picked up? */ - struct GNUNET_HashCode tip_id; + struct TALER_TipIdentifierP tip_id; /** * What is the ID of the pickup operation? (Basically a * hash over the key inputs). */ - struct GNUNET_HashCode pickup_id; + struct TALER_PickupIdentifierP pickup_id; /** * Array of our planchets. @@ -636,7 +636,7 @@ TMH_post_tips_ID_pickup (const struct TMH_RequestHandler *rh, GNUNET_assert (NULL != hc->infix); if (GNUNET_OK != GNUNET_CRYPTO_hash_from_string (hc->infix, - &pc->tip_id)) + &pc->tip_id.hash)) { /* tip_id has wrong encoding */ GNUNET_break_op (0); @@ -722,7 +722,7 @@ TMH_post_tips_ID_pickup (const struct TMH_RequestHandler *rh, pd->coin_ev_size); } GNUNET_CRYPTO_hash_context_finish (hc, - &pc->pickup_id); + &pc->pickup_id.hash); } } @@ -804,7 +804,7 @@ RETRY: sigs); GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Lookup pickup `%s' resulted in %d\n", - GNUNET_h2s (&pc->pickup_id), + GNUNET_h2s (&pc->pickup_id.hash), qs); if (qs > GNUNET_DB_STATUS_SUCCESS_ONE_RESULT) qs = GNUNET_DB_STATUS_SUCCESS_ONE_RESULT; @@ -830,7 +830,7 @@ RETRY: } GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Lookup pickup `%s' initiated withdraw #%u\n", - GNUNET_h2s (&pc->pickup_id), + GNUNET_h2s (&pc->pickup_id.hash), i); try_withdraw (pc, exchange_url, diff --git a/src/backend/taler-merchant-httpd_private-get-tips-ID.c b/src/backend/taler-merchant-httpd_private-get-tips-ID.c index 0460b3c7..9b2e0de2 100644 --- a/src/backend/taler-merchant-httpd_private-get-tips-ID.c +++ b/src/backend/taler-merchant-httpd_private-get-tips-ID.c @@ -33,7 +33,7 @@ TMH_private_get_tips_ID (const struct TMH_RequestHandler *rh, struct MHD_Connection *connection, struct TMH_HandlerContext *hc) { - struct GNUNET_HashCode tip_id; + struct TALER_TipIdentifierP tip_id; struct TALER_Amount total_authorized; struct TALER_Amount total_picked_up; char *reason; @@ -48,7 +48,7 @@ TMH_private_get_tips_ID (const struct TMH_RequestHandler *rh, GNUNET_assert (NULL != hc->infix); if (GNUNET_OK != GNUNET_CRYPTO_hash_from_string (hc->infix, - &tip_id)) + &tip_id.hash)) { /* tip_id has wrong encoding */ GNUNET_break_op (0); diff --git a/src/backend/taler-merchant-httpd_private-get-tips.c b/src/backend/taler-merchant-httpd_private-get-tips.c index e222daae..4f358be2 100644 --- a/src/backend/taler-merchant-httpd_private-get-tips.c +++ b/src/backend/taler-merchant-httpd_private-get-tips.c @@ -33,7 +33,7 @@ static void add_tip (void *cls, uint64_t row_id, - struct GNUNET_HashCode tip_id, + struct TALER_TipIdentifierP tip_id, struct TALER_Amount amount) { json_t *pa = cls; diff --git a/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c b/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c index 1b69fa21..0072007d 100644 --- a/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c +++ b/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c @@ -45,7 +45,7 @@ authorize_tip (const struct TMH_RequestHandler *rh, { enum TALER_ErrorCode ec; struct GNUNET_TIME_Timestamp expiration; - struct GNUNET_HashCode tip_id; + struct TALER_TipIdentifierP tip_id; const char *justification; const char *next_url; struct TALER_Amount amount; @@ -119,7 +119,7 @@ authorize_tip (const struct TMH_RequestHandler *rh, struct GNUNET_CRYPTO_HashAsciiEncoded hash_enc; MHD_RESULT res; - GNUNET_CRYPTO_hash_to_enc (&tip_id, + GNUNET_CRYPTO_hash_to_enc (&tip_id.hash, &hash_enc); taler_tip_uri = TMH_make_taler_tip_uri (connection, &tip_id, diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c index 1b55ecd6..e7c53a62 100644 --- a/src/backenddb/plugin_merchantdb_postgres.c +++ b/src/backenddb/plugin_merchantdb_postgres.c @@ -5919,7 +5919,7 @@ postgres_authorize_tip (void *cls, const struct TALER_Amount *amount, const char *justification, const char *next_url, - struct GNUNET_HashCode *tip_id, + struct TALER_TipIdentifierP *tip_id, struct GNUNET_TIME_Timestamp *expiration) { struct PostgresClosure *pg = cls; @@ -6196,8 +6196,8 @@ lookup_signatures_cb (void *cls, static enum GNUNET_DB_QueryStatus postgres_lookup_pickup (void *cls, const char *instance_id, - const struct GNUNET_HashCode *tip_id, - const struct GNUNET_HashCode *pickup_id, + const struct TALER_TipIdentifierP *tip_id, + const struct TALER_PickupIdentifierP *pickup_id, char **exchange_url, struct TALER_ReservePrivateKeyP *reserve_priv, unsigned int sigs_length, @@ -6266,7 +6266,7 @@ postgres_lookup_pickup (void *cls, static enum GNUNET_DB_QueryStatus postgres_lookup_tip (void *cls, const char *instance_id, - const struct GNUNET_HashCode *tip_id, + const struct TALER_TipIdentifierP *tip_id, struct TALER_Amount *total_authorized, struct TALER_Amount *total_picked_up, struct GNUNET_TIME_Timestamp *expiration, @@ -6346,7 +6346,7 @@ lookup_tips_cb (void *cls, for (unsigned int i = 0; i < num_results; i++) { uint64_t row_id; - struct GNUNET_HashCode tip_id; + struct TALER_TipIdentifierP tip_id; struct TALER_Amount tip_amount; struct GNUNET_PQ_ResultSpec rs[] = { GNUNET_PQ_result_spec_uint64 ("tip_serial", @@ -6533,7 +6533,7 @@ lookup_pickup_details_cb (void *cls, static enum GNUNET_DB_QueryStatus postgres_lookup_tip_details (void *cls, const char *instance_id, - const struct GNUNET_HashCode *tip_id, + const struct TALER_TipIdentifierP *tip_id, bool fpu, struct TALER_Amount *total_authorized, struct TALER_Amount *total_picked_up, @@ -6629,9 +6629,9 @@ postgres_lookup_tip_details (void *cls, static enum GNUNET_DB_QueryStatus postgres_insert_pickup (void *cls, const char *instance_id, - const struct GNUNET_HashCode *tip_id, + const struct TALER_TipIdentifierP *tip_id, const struct TALER_Amount *total_picked_up, - const struct GNUNET_HashCode *pickup_id, + const struct TALER_PickupIdentifierP *pickup_id, const struct TALER_Amount *total_requested) { struct PostgresClosure *pg = cls; @@ -6733,7 +6733,7 @@ postgres_insert_pickup (void *cls, static enum GNUNET_DB_QueryStatus postgres_insert_pickup_blind_signature ( void *cls, - const struct GNUNET_HashCode *pickup_id, + const struct TALER_PickupIdentifierP *pickup_id, uint32_t offset, const struct TALER_BlindedDenominationSignature *blind_sig) { diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h index 7520b553..f4eded04 100644 --- a/src/include/taler_merchant_service.h +++ b/src/include/taler_merchant_service.h @@ -3140,7 +3140,7 @@ struct TALER_MERCHANT_TipDetails /** * Identifier for the tip. */ - struct GNUNET_HashCode tip_id; + struct TALER_TipIdentifierP tip_id; /** * Total value of the tip (including fees). @@ -3230,7 +3230,7 @@ typedef void (*TALER_MERCHANT_TipAuthorizeCallback) ( void *cls, const struct TALER_MERCHANT_HttpResponse *hr, - struct GNUNET_HashCode *tip_id, + struct TALER_TipIdentifierP *tip_id, const char *tip_uri, struct GNUNET_TIME_Timestamp tip_expiration); @@ -3403,7 +3403,7 @@ typedef void struct TALER_MERCHANT_TipWalletGetHandle * TALER_MERCHANT_wallet_tip_get (struct GNUNET_CURL_Context *ctx, const char *backend_url, - const struct GNUNET_HashCode *tip_id, + const struct TALER_TipIdentifierP *tip_id, TALER_MERCHANT_TipWalletGetCallback cb, void *cb_cls); @@ -3414,8 +3414,8 @@ TALER_MERCHANT_wallet_tip_get (struct GNUNET_CURL_Context *ctx, * @param tgh handle to the request to be canceled */ void -TALER_MERCHANT_wallet_tip_get_cancel (struct - TALER_MERCHANT_TipWalletGetHandle *tgh); +TALER_MERCHANT_wallet_tip_get_cancel ( + struct TALER_MERCHANT_TipWalletGetHandle *tgh); /** @@ -3432,7 +3432,7 @@ struct TALER_MERCHANT_PickupDetail /** * Identifier of the pickup. */ - struct GNUNET_HashCode pickup_id; + struct TALER_PickupIdentifierP pickup_id; /** * Number of planchets involved. @@ -3445,6 +3445,7 @@ struct TALER_MERCHANT_PickupDetail struct TALER_Amount requested_amount; }; + /** * Callback to process a GET /private/tips/$TIP_ID request * @@ -3486,7 +3487,7 @@ typedef void struct TALER_MERCHANT_TipMerchantGetHandle * TALER_MERCHANT_merchant_tip_get (struct GNUNET_CURL_Context *ctx, const char *backend_url, - const struct GNUNET_HashCode *tip_id, + const struct TALER_TipIdentifierP *tip_id, bool pickups, TALER_MERCHANT_TipMerchantGetCallback cb, void *cb_cls); @@ -3521,7 +3522,7 @@ struct TALER_MERCHANT_TipEntry /** * Identifier for the tip. */ - struct GNUNET_HashCode tip_id; + struct TALER_TipIdentifierP tip_id; /** * Total value of the tip (including fees). @@ -3650,7 +3651,7 @@ struct TALER_MERCHANT_PlanchetData struct TALER_MERCHANT_TipPickupHandle * TALER_MERCHANT_tip_pickup (struct GNUNET_CURL_Context *ctx, const char *backend_url, - const struct GNUNET_HashCode *tip_id, + const struct TALER_TipIdentifierP *tip_id, unsigned int num_planchets, const struct TALER_MERCHANT_PlanchetData planchets[], TALER_MERCHANT_TipPickupCallback pickup_cb, @@ -3706,7 +3707,7 @@ typedef void struct TALER_MERCHANT_TipPickup2Handle * TALER_MERCHANT_tip_pickup2 (struct GNUNET_CURL_Context *ctx, const char *backend_url, - const struct GNUNET_HashCode *tip_id, + const struct TALER_TipIdentifierP *tip_id, unsigned int num_planchets, const struct TALER_PlanchetDetail planchets[], TALER_MERCHANT_TipPickup2Callback pickup_cb, diff --git a/src/include/taler_merchant_testing_lib.h b/src/include/taler_merchant_testing_lib.h index 18a1e0cc..b846b622 100644 --- a/src/include/taler_merchant_testing_lib.h +++ b/src/include/taler_merchant_testing_lib.h @@ -1496,7 +1496,8 @@ TALER_TESTING_cmd_merchant_kyc_get (const char *label, // FIXME: rename: refund_entry->refund_detail #define TALER_MERCHANT_TESTING_SIMPLE_TRAITS(op) \ op (claim_nonce, const struct GNUNET_CRYPTO_EddsaPublicKey) \ - op (tip_id, const struct GNUNET_HashCode) \ + op (tip_id, const struct TALER_TipIdentifierP) \ + op (pickup_id, const struct TALER_PickupIdentifierP) \ op (instance_name, const char *) \ op (instance_id, const char *) \ op (address, const json_t) \ diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h index 3925011a..b4dc17b2 100644 --- a/src/include/taler_merchantdb_plugin.h +++ b/src/include/taler_merchantdb_plugin.h @@ -552,7 +552,7 @@ struct TALER_MERCHANTDB_TipDetails /** * ID of the tip. */ - struct GNUNET_HashCode tip_id; + struct TALER_TipIdentifierP tip_id; /** * Total amount of the tip. @@ -633,7 +633,7 @@ typedef void typedef void (*TALER_MERCHANTDB_TipsCallback)(void *cls, uint64_t row_id, - struct GNUNET_HashCode tip_id, + struct TALER_TipIdentifierP tip_id, struct TALER_Amount amount); @@ -675,7 +675,7 @@ struct TALER_MERCHANTDB_PickupDetails /** * Identifier for the pickup operation. */ - struct GNUNET_HashCode pickup_id; + struct TALER_PickupIdentifierP pickup_id; /** * Total amount requested for this @e pickup_id. @@ -2168,7 +2168,7 @@ struct TALER_MERCHANTDB_Plugin const struct TALER_Amount *amount, const char *justification, const char *next_url, - struct GNUNET_HashCode *tip_id, + struct TALER_TipIdentifierP *tip_id, struct GNUNET_TIME_Timestamp *expiration); @@ -2189,8 +2189,8 @@ struct TALER_MERCHANTDB_Plugin enum GNUNET_DB_QueryStatus (*lookup_pickup)(void *cls, const char *instance_id, - const struct GNUNET_HashCode *tip_id, - const struct GNUNET_HashCode *pickup_id, + const struct TALER_TipIdentifierP *tip_id, + const struct TALER_PickupIdentifierP *pickup_id, char **exchange_url, struct TALER_ReservePrivateKeyP *reserve_priv, unsigned int sigs_length, @@ -2213,7 +2213,7 @@ struct TALER_MERCHANTDB_Plugin enum GNUNET_DB_QueryStatus (*lookup_tip)(void *cls, const char *instance_id, - const struct GNUNET_HashCode *tip_id, + const struct TALER_TipIdentifierP *tip_id, struct TALER_Amount *total_authorized, struct TALER_Amount *total_picked_up, struct GNUNET_TIME_Timestamp *expiration, @@ -2263,7 +2263,7 @@ struct TALER_MERCHANTDB_Plugin enum GNUNET_DB_QueryStatus (*lookup_tip_details)(void *cls, const char *instance_id, - const struct GNUNET_HashCode *tip_id, + const struct TALER_TipIdentifierP *tip_id, bool fpu, struct TALER_Amount *total_authorized, struct TALER_Amount *total_picked_up, @@ -2295,9 +2295,9 @@ struct TALER_MERCHANTDB_Plugin enum GNUNET_DB_QueryStatus (*insert_pickup)(void *cls, const char *instance_id, - const struct GNUNET_HashCode *tip_id, + const struct TALER_TipIdentifierP *tip_id, const struct TALER_Amount *total_picked_up, - const struct GNUNET_HashCode *pickup_id, + const struct TALER_PickupIdentifierP *pickup_id, const struct TALER_Amount *total_requested); @@ -2316,7 +2316,7 @@ struct TALER_MERCHANTDB_Plugin enum GNUNET_DB_QueryStatus (*insert_pickup_blind_signature)( void *cls, - const struct GNUNET_HashCode *pickup_id, + const struct TALER_PickupIdentifierP *pickup_id, uint32_t offset, const struct TALER_BlindedDenominationSignature *blind_sig); diff --git a/src/lib/merchant_api_common.c b/src/lib/merchant_api_common.c index c2fbaa39..7e22f645 100644 --- a/src/lib/merchant_api_common.c +++ b/src/lib/merchant_api_common.c @@ -21,12 +21,8 @@ */ #include "platform.h" #include <curl/curl.h> -#include <jansson.h> -#include <microhttpd.h> /* just for HTTP status codes */ -#include <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_uri_lib.h> -#include <gnunet/gnunet_curl_lib.h> #include "taler_merchant_service.h" +#include <gnunet/gnunet_uri_lib.h> #include <taler/taler_json_lib.h> diff --git a/src/lib/merchant_api_merchant_get_tip.c b/src/lib/merchant_api_merchant_get_tip.c index 374634b4..020167c4 100644 --- a/src/lib/merchant_api_merchant_get_tip.c +++ b/src/lib/merchant_api_merchant_get_tip.c @@ -257,7 +257,7 @@ handle_merchant_tip_get_finished (void *cls, struct TALER_MERCHANT_TipMerchantGetHandle * TALER_MERCHANT_merchant_tip_get (struct GNUNET_CURL_Context *ctx, const char *backend_url, - const struct GNUNET_HashCode *tip_id, + const struct TALER_TipIdentifierP *tip_id, bool pickups, TALER_MERCHANT_TipMerchantGetCallback cb, void *cb_cls) diff --git a/src/lib/merchant_api_tip_authorize.c b/src/lib/merchant_api_tip_authorize.c index c56fab38..f8990b4c 100644 --- a/src/lib/merchant_api_tip_authorize.c +++ b/src/lib/merchant_api_tip_authorize.c @@ -86,7 +86,7 @@ check_ok (struct TALER_MERCHANT_TipAuthorizeHandle *tao, { const char *tip_status_url; const char *taler_tip_uri; - struct GNUNET_HashCode tip_id; + struct TALER_TipIdentifierP tip_id; struct GNUNET_TIME_Timestamp expiration_time; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_string ("tip_status_url", &tip_status_url), diff --git a/src/lib/merchant_api_tip_pickup.c b/src/lib/merchant_api_tip_pickup.c index 9d3a27d7..c16866a5 100644 --- a/src/lib/merchant_api_tip_pickup.c +++ b/src/lib/merchant_api_tip_pickup.c @@ -169,7 +169,7 @@ pickup_done_cb (void *cls, struct TALER_MERCHANT_TipPickupHandle * TALER_MERCHANT_tip_pickup (struct GNUNET_CURL_Context *ctx, const char *backend_url, - const struct GNUNET_HashCode *tip_id, + const struct TALER_TipIdentifierP *tip_id, unsigned int num_planchets, const struct TALER_MERCHANT_PlanchetData *pds, TALER_MERCHANT_TipPickupCallback pickup_cb, diff --git a/src/lib/merchant_api_tip_pickup2.c b/src/lib/merchant_api_tip_pickup2.c index f11f4a6d..ef9ccc21 100644 --- a/src/lib/merchant_api_tip_pickup2.c +++ b/src/lib/merchant_api_tip_pickup2.c @@ -232,7 +232,7 @@ handle_tip_pickup_finished (void *cls, struct TALER_MERCHANT_TipPickup2Handle * TALER_MERCHANT_tip_pickup2 (struct GNUNET_CURL_Context *ctx, const char *backend_url, - const struct GNUNET_HashCode *tip_id, + const struct TALER_TipIdentifierP *tip_id, unsigned int num_planchets, const struct TALER_PlanchetDetail planchets[], TALER_MERCHANT_TipPickup2Callback pickup_cb, diff --git a/src/lib/merchant_api_wallet_get_tip.c b/src/lib/merchant_api_wallet_get_tip.c index cd40dc4e..07a46ab7 100644 --- a/src/lib/merchant_api_wallet_get_tip.c +++ b/src/lib/merchant_api_wallet_get_tip.c @@ -159,7 +159,7 @@ handle_wallet_tip_get_finished (void *cls, struct TALER_MERCHANT_TipWalletGetHandle * TALER_MERCHANT_wallet_tip_get (struct GNUNET_CURL_Context *ctx, const char *backend_url, - const struct GNUNET_HashCode *tip_id, + const struct TALER_TipIdentifierP *tip_id, TALER_MERCHANT_TipWalletGetCallback cb, void *cb_cls) { 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); |