From 618a3dd10f731a6f215d5035499611a7e31fbfb0 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 1 Apr 2024 16:12:02 +0200 Subject: improve logging in taler-merchant-exchange --- src/backend/taler-merchant-exchange.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/backend/taler-merchant-exchange.c b/src/backend/taler-merchant-exchange.c index e3b0d6c4..d38e832b 100644 --- a/src/backend/taler-merchant-exchange.c +++ b/src/backend/taler-merchant-exchange.c @@ -476,6 +476,7 @@ end_inquiry (struct Inquiry *w) (at_limit) ) { at_limit = false; + GNUNET_assert (NULL == task); task = GNUNET_SCHEDULER_add_now (&find_work, NULL); } @@ -707,6 +708,9 @@ check_transfer (void *cls, GNUNET_break (0); return; /* already had a serious issue; odd that we're called more than once as well... */ } + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Checking coin with value %s\n", + TALER_amount2s (amount_with_fee)); if ( (GNUNET_OK != TALER_amount_cmp_currency (amount_with_fee, &ttd->coin_value)) || @@ -721,6 +725,15 @@ check_transfer (void *cls, /* Disagreement between the exchange and us about how much this coin is worth! */ GNUNET_break_op (0); + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Disagreement about coin value %s\n", + TALER_amount2s (&ttd->coin_value)); + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Expected fee is %s\n", + TALER_amount2s (&ttd->coin_fee)); + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Fee of exchange is %s\n", + TALER_amount2s (deposit_fee)); ctc->check_transfer_result = GNUNET_SYSERR; /* Build the `TrackTransferConflictDetails` */ ctc->ec = TALER_EC_MERCHANT_PRIVATE_POST_TRANSFERS_CONFLICTING_REPORTS; @@ -1203,6 +1216,7 @@ run (void *cls, &transfer_added, NULL); } + GNUNET_assert (NULL == task); task = GNUNET_SCHEDULER_add_now (&find_work, NULL); } -- cgit v1.2.3