aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-12-24 15:58:23 +0100
committerChristian Grothoff <christian@grothoff.org>2019-12-24 15:58:23 +0100
commit32ec655418efc922f525ac6bce473238425a123b (patch)
treef3aa6df97eceb2aeacc3880c312a62759eb74bf8
parent0e064ce9146cfcebeb7b022cd78289e638967e1a (diff)
handle denomination key not found better
-rw-r--r--src/auditor/taler-auditor.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/auditor/taler-auditor.c b/src/auditor/taler-auditor.c
index 6e4c76a9e..5c28daa05 100644
--- a/src/auditor/taler-auditor.c
+++ b/src/auditor/taler-auditor.c
@@ -765,6 +765,8 @@ get_denomination_info_by_hash (const struct GNUNET_HashCode *dh,
&master_pub,
&add_denomination,
NULL);
+ if (qs <= 0)
+ return qs;
i = GNUNET_CONTAINER_multihashmap_get (denominations,
dh);
if (NULL != i)
@@ -773,7 +775,8 @@ get_denomination_info_by_hash (const struct GNUNET_HashCode *dh,
*issue = i;
return GNUNET_DB_STATUS_SUCCESS_ONE_RESULT;
}
- /* nope, definitively not there, hard error */
+ /* This should be impossible; hard error */
+ GNUNET_break (0);
return GNUNET_DB_STATUS_HARD_ERROR;
}
@@ -1129,6 +1132,11 @@ handle_reserve_out (void *cls,
if (0 > qs)
{
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
+ if (GNUNET_DB_STATUS_HARD_ERROR == qs)
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Hard database error trying to get denomination %s (%s) from database!\n",
+ TALER_B2S (denom_pub),
+ TALER_amount2s (amount_with_fee));
rc->qs = qs;
return GNUNET_SYSERR;
}