diff options
Diffstat (limited to 'src/testing/testing_api_cmd_recoup.c')
-rw-r--r-- | src/testing/testing_api_cmd_recoup.c | 55 |
1 files changed, 3 insertions, 52 deletions
diff --git a/src/testing/testing_api_cmd_recoup.c b/src/testing/testing_api_cmd_recoup.c index 379304d01..6290f255e 100644 --- a/src/testing/testing_api_cmd_recoup.c +++ b/src/testing/testing_api_cmd_recoup.c @@ -54,12 +54,6 @@ struct RecoupState struct TALER_EXCHANGE_RecoupHandle *ph; /** - * NULL if coin was not refreshed, otherwise reference - * to the melt operation underlying @a coin_reference. - */ - const char *melt_reference; - - /** * If the recoup filled a reserve, this is set to the reserve's public key. */ struct TALER_ReservePublicKeyP reserve_pub; @@ -124,14 +118,12 @@ parse_coin_reference (const char *coin_reference, * * @param cls closure * @param hr HTTP response details - * @param reserve_pub public key of the reserve receiving the recoup, NULL if refreshed or on error - * @param old_coin_pub public key of the dirty coin, NULL if not refreshed or on error + * @param reserve_pub public key of the reserve receiving the recoup */ static void recoup_cb (void *cls, const struct TALER_EXCHANGE_HttpResponse *hr, - const struct TALER_ReservePublicKeyP *reserve_pub, - const struct TALER_CoinSpendPublicKeyP *old_coin_pub) + const struct TALER_ReservePublicKeyP *reserve_pub) { struct RecoupState *ps = cls; struct TALER_TESTING_Interpreter *is = ps->is; @@ -183,44 +175,6 @@ recoup_cb (void *cls, { case MHD_HTTP_OK: /* check old_coin_pub or reserve_pub, respectively */ - if (NULL != ps->melt_reference) - { - const struct TALER_TESTING_Command *melt_cmd; - const struct TALER_CoinSpendPrivateKeyP *dirty_priv; - struct TALER_CoinSpendPublicKeyP oc; - - melt_cmd = TALER_TESTING_interpreter_lookup_command (is, - ps->melt_reference); - if (NULL == melt_cmd) - { - GNUNET_break (0); - TALER_TESTING_interpreter_fail (is); - return; - } - if (GNUNET_OK != - TALER_TESTING_get_trait_coin_priv (melt_cmd, - 0, - &dirty_priv)) - { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Coin %u not found in command %s\n", - 0, - ps->melt_reference); - GNUNET_break (0); - TALER_TESTING_interpreter_fail (is); - return; - } - GNUNET_CRYPTO_eddsa_key_get_public (&dirty_priv->eddsa_priv, - &oc.eddsa_pub); - if (0 != GNUNET_memcmp (&oc, - old_coin_pub)) - { - GNUNET_break (0); - TALER_TESTING_interpreter_fail (is); - return; - } - } - else { const struct TALER_ReservePrivateKeyP *reserve_priv; @@ -365,8 +319,7 @@ recoup_run (void *cls, coin_sig, &planchet, &ps->reserve_history.amount, - NULL != ps->melt_reference, - recoup_cb, + &recoup_cb, ps); GNUNET_assert (NULL != ps->ph); } @@ -432,7 +385,6 @@ struct TALER_TESTING_Command TALER_TESTING_cmd_recoup (const char *label, unsigned int expected_response_code, const char *coin_reference, - const char *melt_reference, const char *amount) { struct RecoupState *ps; @@ -440,7 +392,6 @@ TALER_TESTING_cmd_recoup (const char *label, ps = GNUNET_new (struct RecoupState); ps->expected_response_code = expected_response_code; ps->coin_reference = coin_reference; - ps->melt_reference = melt_reference; if (GNUNET_OK != TALER_string_to_amount (amount, &ps->reserve_history.amount)) |