commit 1ba6a8ba524f69ab717c2c27e7ff69de87b16afa
parent 4fd5b73afb6930dc770461c8216e62aa55c72cc4
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 8 Nov 2026 23:26:20 +0100
wake up on new deposit confirmations
Diffstat:
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/src/auditor/taler-helper-auditor-deposits.c b/src/auditor/taler-helper-auditor-deposits.c
@@ -92,11 +92,18 @@ static TALER_ARL_DEF_AB (total_missed_deposit_confirmations);
static int internal_checks;
/**
- * Handler to wake us up on new deposit confirmations.
+ * Handler to wake us up on new deposits in the exchange database.
*/
static struct GNUNET_DB_EventHandler *eh;
/**
+ * Handler to wake us up on new deposit confirmations reported
+ * by merchants (NOTIFY'ed by the trigger on
+ * auditor_deposit_confirmations).
+ */
+static struct GNUNET_DB_EventHandler *eh_dc;
+
+/**
* The auditors's configuration.
*/
static const struct GNUNET_CONFIGURATION_Handle *cfg;
@@ -412,6 +419,11 @@ do_shutdown (void *cls)
TALER_AUDITORDB_event_listen_cancel (eh);
eh = NULL;
}
+ if (NULL != eh_dc)
+ {
+ TALER_AUDITORDB_event_listen_cancel (eh_dc);
+ eh_dc = NULL;
+ }
TALER_ARL_done ();
}
@@ -450,6 +462,10 @@ run (void *cls,
.size = htons (sizeof (es)),
.type = htons (TALER_DBEVENT_EXCHANGE_AUDITOR_WAKE_HELPER_DEPOSITS)
};
+ struct GNUNET_DB_EventHeaderP es_dc = {
+ .size = htons (sizeof (es_dc)),
+ .type = htons (TALER_DBEVENT_EXCHANGE_AUDITOR_NEW_DEPOSIT_CONFIRMATION)
+ };
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Running helper indefinitely\n");
@@ -458,6 +474,11 @@ run (void *cls,
GNUNET_TIME_UNIT_FOREVER_REL,
&db_notify,
NULL);
+ eh_dc = TALER_AUDITORDB_event_listen (TALER_ARL_adb,
+ &es_dc,
+ GNUNET_TIME_UNIT_FOREVER_REL,
+ &db_notify,
+ NULL);
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Starting audit\n");