exchange

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

commit 9df80b513290e84f795e6957d7cf52ebae813037
parent a2d3841fff6ba615386fb232de5c2f4c6852f18e
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu, 13 Aug 2026 20:19:59 +0200

compute key_action_time() while holding lock

Diffstat:
Msrc/util/secmod_eddsa.c | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/util/secmod_eddsa.c b/src/util/secmod_eddsa.c @@ -667,6 +667,8 @@ create_key (void) * At what time does the current key set require its next action? Basically, * the minimum of the expiration time of the oldest key, and the expiration * time of the newest key minus the #lookahead_sign time. + * + * Must only be called while the #keys_lock is held. */ static struct GNUNET_TIME_Absolute key_action_time (void) @@ -701,6 +703,7 @@ update_keys (void *cls) { bool wake = false; struct Key *nxt; + struct GNUNET_TIME_Absolute at; (void) cls; keygen_task = NULL; @@ -753,10 +756,11 @@ update_keys (void *cls) purge_key (nxt); nxt = nxt->next; } + at = key_action_time (); GNUNET_assert (0 == pthread_mutex_unlock (&keys_lock)); if (wake) TES_wake_clients (); - keygen_task = GNUNET_SCHEDULER_add_at (key_action_time (), + keygen_task = GNUNET_SCHEDULER_add_at (at, &update_keys, NULL); }