From 1fae7a4f9ef3167dc1d47de2607fd5676d39722d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 17 Oct 2017 14:04:21 +0200 Subject: [PATCH] report if DK lacks auditor signature --- src/exchange/taler-exchange-httpd_keystate.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/exchange/taler-exchange-httpd_keystate.c b/src/exchange/taler-exchange-httpd_keystate.c index 6f3ced2b5..17ba9da83 100644 --- a/src/exchange/taler-exchange-httpd_keystate.c +++ b/src/exchange/taler-exchange-httpd_keystate.c @@ -892,10 +892,15 @@ reload_auditor_iter (void *cls, keys actually match the denomination keys that are active right now */ for (unsigned int i=0;idenomkey_map, &dki[i].denom_hash)) continue; + /* Note: the array is sorted, we could theoretically + speed this up using a binary search. */ for (unsigned int j=0;jdenomkey_array_length;j++) { struct DenominationKeyEntry *dke = &rfc->denomkey_array[j]; @@ -1449,7 +1454,17 @@ make_fresh_key_state () TALER_EXCHANGEDB_auditor_iterate (cfg, &reload_auditor_iter, &rfc); - + /* Sanity check: do we have auditors for all denomination keys? */ + for (unsigned int i=0;ias_head) + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Denomination key `%s' not signed by any auditor!\n", + GNUNET_h2s (&dke->denom_key_hash)); + } + /* Determine size of `krd_array` by counting number of discrete denomination key starting times. */ last = GNUNET_TIME_UNIT_ZERO_ABS;