exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 58489df3b9468ee024a3920ba1d28dc40a663e87
parent 7391f650a5587a2a78b6068546ae89bc2874414e
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 12 Jul 2026 22:05:51 +0200

correctly accumulate total withdrawn

Diffstat:
Msrc/testing/testing_api_cmd_age_withdraw.c | 19++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/testing/testing_api_cmd_age_withdraw.c b/src/testing/testing_api_cmd_age_withdraw.c @@ -329,16 +329,25 @@ age_withdraw_run ( &dpk->key); /* Accumulate the expected total amount and fee for the history */ - GNUNET_assert (0 <= - TALER_amount_add (&aws->reserve_history.amount, - &cos->amount, - &denom_pub->fees.withdraw)); if (i == 0) + { + GNUNET_assert (GNUNET_OK == + TALER_amount_set_zero ( + cos->amount.currency, + &aws->reserve_history.amount)); GNUNET_assert (GNUNET_OK == TALER_amount_set_zero ( denom_pub->fees.withdraw.currency, &aws->reserve_history.details.withdraw.fee)); - + } + GNUNET_assert (0 <= + TALER_amount_add (&aws->reserve_history.amount, + &aws->reserve_history.amount, + &cos->amount)); + GNUNET_assert (0 <= + TALER_amount_add (&aws->reserve_history.amount, + &aws->reserve_history.amount, + &denom_pub->fees.withdraw)); GNUNET_assert (0 <= TALER_amount_add (&aws->reserve_history.details.withdraw.fee, &aws->reserve_history.details.withdraw.fee,