exchange

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

commit 0da81c2a5dcccb1d6069729d620f998740f5ac7b
parent e5e2b93de3e825ec4ca916bd5091414c7a172ec1
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed,  1 Jan 2025 17:12:55 +0100

-fix FIXME: initialize nbalance

Diffstat:
Msrc/auditor/taler-helper-auditor-reserves.c | 15++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/auditor/taler-helper-auditor-reserves.c b/src/auditor/taler-helper-auditor-reserves.c @@ -1393,6 +1393,7 @@ verify_reserve_balance (void *cls, GNUNET_assert (GNUNET_OK == TALER_amount_set_zero (TALER_ARL_currency, &rs->curr_balance.reserve_balance)); + nbalance = rs->curr_balance.reserve_balance; } else { @@ -1567,13 +1568,6 @@ verify_reserve_balance (void *cls, else { /* We failed to determine the closing fee, complain! */ - // FIXME: fix correctly and not just comment out - // nbalance is set to invalid and there is never a check happening when working further with nbalance, - // why so and why adding those balances here? or what's the usecase of setting nbalance to zero? - /* - TALER_ARL_amount_add (&TALER_ARL_USE_AB(total_balance_reserve_not_closed), - &TALER_ARL_USE_AB(total_balance_reserve_not_closed), - &nbalance);*/ struct TALER_AUDITORDB_ReserveNotClosedInconsistency rncid = { .reserve_pub = rs->reserve_pub, .balance = nbalance, @@ -1581,6 +1575,13 @@ verify_reserve_balance (void *cls, .diagnostic = (char *) "could not determine closing fee" }; + /* Even if we don't know the closing fee, update the + total_balance_reserve_not_closed */ + TALER_ARL_amount_add (&TALER_ARL_USE_AB ( + total_balance_reserve_not_closed), + &TALER_ARL_USE_AB ( + total_balance_reserve_not_closed), + &nbalance); qs = TALER_ARL_adb->insert_reserve_not_closed_inconsistency ( TALER_ARL_adb->cls, &rncid);