exchange

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

commit 343cee4373a64d2f56359be33ecc96f18c801b72
parent eb9452f83903ac6e757e46e5cf225165feae2053
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue,  3 Nov 2026 22:56:14 +0100

reject invalid CURRENCY_ROUND_UNIT settings

Diffstat:
Msrc/auditor/report-lib.c | 12+++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/auditor/report-lib.c b/src/auditor/report-lib.c @@ -772,12 +772,22 @@ TALER_ARL_init (const struct GNUNET_CONFIGURATION_Handle *c) "CURRENCY_ROUND_UNIT", &TALER_ARL_currency_round_unit)) || ( (0 != TALER_ARL_currency_round_unit.fraction) && - (0 != TALER_ARL_currency_round_unit.value) ) ) + (0 != TALER_ARL_currency_round_unit.value) ) || + (TALER_amount_is_zero (&TALER_ARL_currency_round_unit)) ) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Need non-zero value in section `exchange' under `CURRENCY_ROUND_UNIT'\n"); return EXIT_NOTCONFIGURED; } + if (GNUNET_OK != + TALER_amount_is_currency (&TALER_ARL_currency_round_unit, + TALER_ARL_currency)) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Value in section `exchange' under `CURRENCY_ROUND_UNIT' must be in currency `%s'\n", + TALER_ARL_currency); + return EXIT_NOTCONFIGURED; + } } if (NULL == (TALER_ARL_edb = TALER_EXCHANGEDB_connect (TALER_ARL_cfg)))