From 536122c4f13052438fdb170184c10015b6e69d4c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 13 Jan 2024 23:14:18 +0100 Subject: -add assertions --- src/backend/taler-merchant-httpd_private-get-orders-ID.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/backend') diff --git a/src/backend/taler-merchant-httpd_private-get-orders-ID.c b/src/backend/taler-merchant-httpd_private-get-orders-ID.c index a5d89f86..f5b75579 100644 --- a/src/backend/taler-merchant-httpd_private-get-orders-ID.c +++ b/src/backend/taler-merchant-httpd_private-get-orders-ID.c @@ -608,6 +608,10 @@ phase_fetch_contract (struct GetOrderRequestContext *gorc) &gorc->wired, &gorc->paid_session_matches, &gorc->claim_token); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "lookup_contract_terms (%s) returned %d\n", + hc->infix, + (int) qs); if (0 > qs) { /* single, read-only SQL statements should never cause @@ -624,6 +628,10 @@ phase_fetch_contract (struct GetOrderRequestContext *gorc) } if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == qs) { + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Order %s is %s (%s) according to database\n", + gorc->paid ? "paid" : "unpaid", + gorc->wire ? "wired" : "unwired"); gorc->phase++; return; } @@ -743,6 +751,8 @@ phase_check_paid (struct GetOrderRequestContext *gorc) GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Order %s unclaimed, no need to lookup payment status\n", hc->infix); + GNUNET_assert (! gorc->paid); + GNUNET_assert (! gorc->wired); gorc->phase++; return; } -- cgit v1.2.3