exchange

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

commit fb72b22251d5c8fb4561c4469693b0130a2cd39d
parent 1b013022b63fda29068dec22bf0c9d0e164e97b8
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun,  8 Nov 2026 22:36:39 +0100

fix accumulator

Diffstat:
Msrc/auditor/taler-helper-auditor-reserves.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/auditor/taler-helper-auditor-reserves.c b/src/auditor/taler-helper-auditor-reserves.c @@ -1533,8 +1533,11 @@ verify_reserve_balance (void *cls, TALER_ARL_amount_subtract (&rbiil.inconsistency_amount, &rs->total_out, &mbalance); + /* Note: 'curr_balance' is folded into 'prev_balance' at the end of + this function, so we must accumulate into 'curr_balance' here + (which starts at zero), not into 'prev_balance'. */ TALER_ARL_amount_add (&rs->curr_balance.reserve_loss, - &rs->prev_balance.reserve_loss, + &rs->curr_balance.reserve_loss, &rbiil.inconsistency_amount); TALER_ARL_amount_add (&TALER_ARL_USE_AB (reserves_reserve_loss), &TALER_ARL_USE_AB (reserves_reserve_loss),