diff options
author | Gian Demarmels <gian@demarmels.org> | 2022-02-04 19:50:40 +0100 |
---|---|---|
committer | Gian Demarmels <gian@demarmels.org> | 2022-02-04 19:50:40 +0100 |
commit | 30c92a9b9e03289d274cce243b6c2a56cc8f5208 (patch) | |
tree | 7ef35f1137c35a20bf95447eeafaf00b780b0890 /src/testing/testing_api_helpers_exchange.c | |
parent | 752c0aca43bb365e16af6e5f09b1e3707ac1b851 (diff) | |
parent | 03fd154a69212df740cf3b09567a1bb081b64873 (diff) |
Merge branch 'master' of ssh://git.taler.net/exchange
Diffstat (limited to 'src/testing/testing_api_helpers_exchange.c')
-rw-r--r-- | src/testing/testing_api_helpers_exchange.c | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/src/testing/testing_api_helpers_exchange.c b/src/testing/testing_api_helpers_exchange.c index a30db033..9414af66 100644 --- a/src/testing/testing_api_helpers_exchange.c +++ b/src/testing/testing_api_helpers_exchange.c @@ -411,18 +411,9 @@ TALER_TESTING_prepare_exchange (const char *config_filename, } -/** - * Find denomination key matching the given amount. - * - * @param keys array of keys to search - * @param amount coin value to look for - * @param cipher denomination cipher - * @return NULL if no matching key was found - */ const struct TALER_EXCHANGE_DenomPublicKey * TALER_TESTING_find_pk (const struct TALER_EXCHANGE_Keys *keys, - const struct TALER_Amount *amount, - const enum TALER_DenominationCipher cipher) + const struct TALER_Amount *amount) { struct GNUNET_TIME_Timestamp now; struct TALER_EXCHANGE_DenomPublicKey *pk; @@ -432,8 +423,6 @@ TALER_TESTING_find_pk (const struct TALER_EXCHANGE_Keys *keys, for (unsigned int i = 0; i<keys->num_denom_keys; i++) { pk = &keys->denom_keys[i]; - if (cipher != pk->key.cipher) - continue; if ( (0 == TALER_amount_cmp (amount, &pk->value)) && (GNUNET_TIME_timestamp_cmp (now, @@ -450,8 +439,6 @@ TALER_TESTING_find_pk (const struct TALER_EXCHANGE_Keys *keys, for (unsigned int i = 0; i<keys->num_denom_keys; i++) { pk = &keys->denom_keys[i]; - if (cipher != pk->key.cipher) - continue; if ( (0 == TALER_amount_cmp (amount, &pk->value)) && (GNUNET_TIME_timestamp_cmp (now, @@ -473,25 +460,6 @@ TALER_TESTING_find_pk (const struct TALER_EXCHANGE_Keys *keys, return NULL; } } - // do 3rd pass to check if cipher type is to blame for failure - for (unsigned int i = 0; i<keys->num_denom_keys; i++) - { - pk = &keys->denom_keys[i]; - if ( (0 == TALER_amount_cmp (amount, - &pk->value)) && - (cipher != pk->key.cipher) ) - { - GNUNET_log - (GNUNET_ERROR_TYPE_WARNING, - "Have denomination key for `%s', but with wrong" - " cipher type %d vs %d\n", - str, - cipher, - pk->key.cipher); - GNUNET_free (str); - return NULL; - } - } GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "No denomination key for amount %s found\n", str); |