exchange

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

commit 64416a58d18350e4bec0a67a963378f8aaf7e759
parent 9eea1687feb74c5a0b2a785cd691677bfcdfc0af
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun,  8 Nov 2026 23:14:22 +0100

report on unexpected currency instead of asserting

Diffstat:
Msrc/auditor/taler-helper-auditor-aggregation.c | 14+++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/auditor/taler-helper-auditor-aggregation.c b/src/auditor/taler-helper-auditor-aggregation.c @@ -1251,6 +1251,18 @@ check_wire_out_cb (struct AggregationContext *ac, TALER_B2S (wtid), TALER_amount2s (amount), GNUNET_TIME_timestamp2s (date)); + if (0 != strcasecmp (amount->currency, + TALER_ARL_currency)) + { + /* Do not feed a foreign currency into our accumulators, + as that would be fatal. */ + qs = report_row_inconsistency ("wire_out", + rowid, + "wire transfer in unexpected currency"); + if (0 > qs) + ac->qs = qs; + return GNUNET_OK; + } if (NULL == (method = TALER_payto_get_method (payto_uri.full_payto))) { qs = report_row_inconsistency ("wire_out", @@ -1265,7 +1277,7 @@ check_wire_out_cb (struct AggregationContext *ac, wcc.qs = GNUNET_DB_STATUS_SUCCESS_ONE_RESULT; wcc.date = date; GNUNET_assert (GNUNET_OK == - TALER_amount_set_zero (amount->currency, + TALER_amount_set_zero (TALER_ARL_currency, &wcc.total_deposits)); wcc.payto_uri = payto_uri; qs = TALER_EXCHANGEDB_iterate_wire_transfers (TALER_ARL_edb,