exchange

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

commit 46759a8c52107c8300e7110d22ffeebf0614c912
parent 7b605f046f1f078fe921b2ab9c9a425ddd01bb1a
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Sat, 18 Jul 2026 11:24:02 +0200

ensure no busy-looping, also honor test_mode

Diffstat:
Msrc/exchange/taler-exchange-router.c | 16++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/exchange/taler-exchange-router.c b/src/exchange/taler-exchange-router.c @@ -292,8 +292,20 @@ run_routing (void *cls) // FIXME #7271: do actual work here! commit_or_warn (); release_shard (s); - task = GNUNET_SCHEDULER_add_now (&run_shard, - NULL); + /* The routing logic above is an unfinished stub (#7271) that currently + performs no work. Until it does, do not busy-loop hammering the + database: honor test_mode (exit once caught up) and otherwise wait + for the configured idle interval before acquiring the next shard. */ + if (test_mode) + { + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Transfers done, shutting down (test mode)\n"); + GNUNET_SCHEDULER_shutdown (); + return; + } + task = GNUNET_SCHEDULER_add_delayed (router_idle_sleep_interval, + &run_shard, + NULL); }