diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-10-17 14:04:21 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-10-17 19:53:44 +0200 |
commit | 1fae7a4f9ef3167dc1d47de2607fd5676d39722d (patch) | |
tree | e38514b77657db851208ea4508a5930bf2a7c42e | |
parent | 0346e37504745d75a6fc90c404d1c9400960af2a (diff) |
report if DK lacks auditor signature
-rw-r--r-- | src/exchange/taler-exchange-httpd_keystate.c | 17 |
1 files changed, 16 insertions, 1 deletions
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;i<dki_len;i++) { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Found auditor signature for DK `%s'\n", + GNUNET_h2s (&dki[i].denom_hash)); if (GNUNET_YES != GNUNET_CONTAINER_multihashmap_contains (key_state->denomkey_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;j<rfc->denomkey_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;i<rfc.denomkey_array_length;i++) + { + const struct DenominationKeyEntry *dke + = &rfc.denomkey_array[i]; + if (NULL == dke->as_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; |