aboutsummaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-02-17 15:10:14 +0100
committerChristian Grothoff <christian@grothoff.org>2022-02-17 15:18:09 +0100
commita351bfc4b4ca15ce7fd998cf9691e85cf84dc426 (patch)
tree88ec3b739914739f05d4c8cae2a2af40d29ebf82 /src/testing
parent8bdf6ab19df70c16d335ecf82f2c3b2117eeb70e (diff)
-fix CS nonce reuse check logic
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/test_exchange_api-cs.conf4
-rw-r--r--src/testing/testing_api_cmd_auditor_add_denom_sig.c5
-rw-r--r--src/testing/testing_api_cmd_deposit.c5
-rw-r--r--src/testing/testing_api_cmd_insert_deposit.c8
-rw-r--r--src/testing/testing_api_cmd_refresh.c4
-rw-r--r--src/testing/testing_api_cmd_withdraw.c22
6 files changed, 20 insertions, 28 deletions
diff --git a/src/testing/test_exchange_api-cs.conf b/src/testing/test_exchange_api-cs.conf
index 79332d648..c50b7e82d 100644
--- a/src/testing/test_exchange_api-cs.conf
+++ b/src/testing/test_exchange_api-cs.conf
@@ -101,7 +101,7 @@ value = EUR:0.10
duration_withdraw = 7 days
duration_spend = 2 years
duration_legal = 3 years
-fee_withdraw = EUR:0.01
+fee_withdraw = EUR:0.00
fee_deposit = EUR:0.01
fee_refresh = EUR:0.03
fee_refund = EUR:0.01
@@ -157,7 +157,7 @@ value = EUR:0.10
duration_withdraw = 7 days
duration_spend = 2 years
duration_legal = 3 years
-fee_withdraw = EUR:0.01
+fee_withdraw = EUR:0.00
fee_deposit = EUR:0.01
fee_refresh = EUR:0.03
fee_refund = EUR:0.01
diff --git a/src/testing/testing_api_cmd_auditor_add_denom_sig.c b/src/testing/testing_api_cmd_auditor_add_denom_sig.c
index 33cd9575e..b8feb7d34 100644
--- a/src/testing/testing_api_cmd_auditor_add_denom_sig.c
+++ b/src/testing/testing_api_cmd_auditor_add_denom_sig.c
@@ -152,10 +152,7 @@ auditor_add_run (void *cls,
dk->expire_deposit,
dk->expire_legal,
&dk->value,
- &dk->fee_withdraw,
- &dk->fee_deposit,
- &dk->fee_refresh,
- &dk->fee_refund,
+ &dk->fees,
&is->auditor_priv,
&auditor_sig);
}
diff --git a/src/testing/testing_api_cmd_deposit.c b/src/testing/testing_api_cmd_deposit.c
index d3fafc630..d3a444ee5 100644
--- a/src/testing/testing_api_cmd_deposit.c
+++ b/src/testing/testing_api_cmd_deposit.c
@@ -409,8 +409,7 @@ deposit_run (void *cls,
{
TALER_age_commitment_hash (age_commitment, &h_age_commitment);
}
-
- ds->deposit_fee = denom_pub->fee_deposit;
+ ds->deposit_fee = denom_pub->fees.deposit;
GNUNET_CRYPTO_eddsa_key_get_public (&coin_priv->eddsa_priv,
&coin_pub.eddsa_pub);
@@ -440,7 +439,7 @@ deposit_run (void *cls,
TALER_JSON_merchant_wire_signature_hash (ds->wire_details,
&h_wire));
TALER_wallet_deposit_sign (&ds->amount,
- &denom_pub->fee_deposit,
+ &denom_pub->fees.deposit,
&h_wire,
&h_contract_terms,
&h_age_commitment,
diff --git a/src/testing/testing_api_cmd_insert_deposit.c b/src/testing/testing_api_cmd_insert_deposit.c
index dcda7cf33..5247ccd7d 100644
--- a/src/testing/testing_api_cmd_insert_deposit.c
+++ b/src/testing/testing_api_cmd_insert_deposit.c
@@ -103,16 +103,16 @@ fake_issue (struct TALER_EXCHANGEDB_DenominationKeyInformationP *issue)
&issue->properties.value));
GNUNET_assert (GNUNET_OK ==
TALER_string_to_amount_nbo ("EUR:0.1",
- &issue->properties.fee_withdraw));
+ &issue->properties.fees.withdraw));
GNUNET_assert (GNUNET_OK ==
TALER_string_to_amount_nbo ("EUR:0.1",
- &issue->properties.fee_deposit));
+ &issue->properties.fees.deposit));
GNUNET_assert (GNUNET_OK ==
TALER_string_to_amount_nbo ("EUR:0.1",
- &issue->properties.fee_refresh));
+ &issue->properties.fees.refresh));
GNUNET_assert (GNUNET_OK ==
TALER_string_to_amount_nbo ("EUR:0.1",
- &issue->properties.fee_refund));
+ &issue->properties.fees.refund));
}
diff --git a/src/testing/testing_api_cmd_refresh.c b/src/testing/testing_api_cmd_refresh.c
index 11c88c19c..a2fb4f158 100644
--- a/src/testing/testing_api_cmd_refresh.c
+++ b/src/testing/testing_api_cmd_refresh.c
@@ -1101,7 +1101,7 @@ melt_run (void *cls,
/* Melt amount starts with the melt fee of the old coin; we'll add the
values and withdraw fees of the fresh coins next */
- melt_amount = melt_denom_pub->fee_refresh;
+ melt_amount = melt_denom_pub->fees.refresh;
age_restricted = melt_denom_pub->key.age_mask.mask != 0;
for (unsigned int i = 0; i<num_fresh_coins; i++)
{
@@ -1136,7 +1136,7 @@ melt_run (void *cls,
GNUNET_assert (0 <=
TALER_amount_add (&melt_amount,
&melt_amount,
- &fresh_pk->fee_withdraw));
+ &fresh_pk->fees.withdraw));
rms->fresh_pks[i] = *fresh_pk;
/* Make a deep copy of the RSA key */
TALER_denom_pub_deep_copy (&rms->fresh_pks[i].key,
diff --git a/src/testing/testing_api_cmd_withdraw.c b/src/testing/testing_api_cmd_withdraw.c
index e5e8adfd5..14015c497 100644
--- a/src/testing/testing_api_cmd_withdraw.c
+++ b/src/testing/testing_api_cmd_withdraw.c
@@ -474,19 +474,15 @@ withdraw_run (void *cls,
GNUNET_assert (0 <=
TALER_amount_add (&ws->reserve_history.amount,
&ws->amount,
- &ws->pk->fee_withdraw));
- ws->reserve_history.details.withdraw.fee = ws->pk->fee_withdraw;
-
- {
-
- ws->wsh = TALER_EXCHANGE_withdraw (is->exchange,
- ws->pk,
- rp,
- &ws->ps,
- ws->h_age_commitment,
- &reserve_withdraw_cb,
- ws);
- }
+ &ws->pk->fees.withdraw));
+ ws->reserve_history.details.withdraw.fee = ws->pk->fees.withdraw;
+ ws->wsh = TALER_EXCHANGE_withdraw (is->exchange,
+ ws->pk,
+ rp,
+ &ws->ps,
+ ws->h_age_commitment,
+ &reserve_withdraw_cb,
+ ws);
if (NULL == ws->wsh)
{
GNUNET_break (0);