diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-09-10 20:00:50 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-09-10 20:00:50 +0200 |
commit | e967208e8c01af28e2ebde34c8deea326f09e5e3 (patch) | |
tree | 30d651095f1a413b0442edeea4c3ea6572201686 /src | |
parent | 852c46668f1c9f766de9473c50e787e32a0f8697 (diff) |
-fix typo
Diffstat (limited to 'src')
-rw-r--r-- | src/exchange/taler-exchange-httpd_batch-deposit.c | 15 | ||||
-rw-r--r-- | src/exchangedb/exchange_do_deposit.sql | 2 | ||||
-rw-r--r-- | src/exchangedb/pg_do_deposit.c | 4 | ||||
-rw-r--r-- | src/exchangedb/pg_get_coin_transactions.c | 16 |
4 files changed, 24 insertions, 13 deletions
diff --git a/src/exchange/taler-exchange-httpd_batch-deposit.c b/src/exchange/taler-exchange-httpd_batch-deposit.c index a5283d205..ca206d23c 100644 --- a/src/exchange/taler-exchange-httpd_batch-deposit.c +++ b/src/exchange/taler-exchange-httpd_batch-deposit.c @@ -202,7 +202,7 @@ batch_deposit_transaction (void *cls, struct BatchDepositContext *dc = cls; const struct TALER_EXCHANGEDB_BatchDeposit *bd = &dc->bd; enum GNUNET_DB_QueryStatus qs = GNUNET_SYSERR; - uint32_t bad_balance_coin_index; + uint32_t bad_balance_coin_index = UINT32_MAX; bool balance_ok; bool in_conflict; @@ -233,6 +233,10 @@ batch_deposit_transaction (void *cls, connection, &known_coin_id, mhd_ret); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "make coin known (%s) returned %d\n", + TALER_B2S (&cdi->coin.coin_pub), + qs); if (qs < 0) return qs; } @@ -256,11 +260,11 @@ batch_deposit_transaction (void *cls, "batch-deposit"); return qs; } - GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "do_deposit returned %d / %s / %u / %s\n", + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "do_deposit returned: %d / %s[%u] / %s\n", qs, balance_ok ? "balance ok" : "balance insufficient", - bad_balance_coin_index, + (unsigned int) bad_balance_coin_index, in_conflict ? "in conflict" : "no conflict"); if (in_conflict) { @@ -276,6 +280,9 @@ batch_deposit_transaction (void *cls, if (! balance_ok) { GNUNET_assert (bad_balance_coin_index < bd->num_cdis); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "returning history of conflicting coin (%s)\n", + TALER_B2S (&bd->cdis[bad_balance_coin_index].coin.coin_pub)); *mhd_ret = TEH_RESPONSE_reply_coin_insufficient_funds ( connection, diff --git a/src/exchangedb/exchange_do_deposit.sql b/src/exchangedb/exchange_do_deposit.sql index f2828cb55..1156c7de5 100644 --- a/src/exchangedb/exchange_do_deposit.sql +++ b/src/exchangedb/exchange_do_deposit.sql @@ -198,7 +198,7 @@ LOOP THEN -- Insufficient balance. -- Note: C arrays are 0 indexed, but i started at 1 - out_insufficient_balance_coin_index=i-i; + out_insufficient_balance_coin_index=i-1; RETURN; END IF; END IF; diff --git a/src/exchangedb/pg_do_deposit.c b/src/exchangedb/pg_do_deposit.c index 11720d7d9..3513ba2b5 100644 --- a/src/exchangedb/pg_do_deposit.c +++ b/src/exchangedb/pg_do_deposit.c @@ -96,6 +96,10 @@ TEH_PG_do_deposit ( amounts_with_fee[i] = cdi->amount_with_fee; coin_pubs[i] = &cdi->coin.coin_pub; coin_sigs[i] = &cdi->csig; + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Do deposit %u = %s\n", + i, + TALER_B2S (&cdi->coin.coin_pub)); } PREPARE (pg, "call_deposit", diff --git a/src/exchangedb/pg_get_coin_transactions.c b/src/exchangedb/pg_get_coin_transactions.c index c2f0f8222..ad0835fdc 100644 --- a/src/exchangedb/pg_get_coin_transactions.c +++ b/src/exchangedb/pg_get_coin_transactions.c @@ -741,14 +741,14 @@ TEH_PG_get_coin_transactions ( ",cdep.coin_deposit_serial_id" ",bdep.done" " FROM coin_deposits cdep" - " JOIN batch_deposits bdep" - " USING (batch_deposit_serial_id)" - " JOIN wire_targets wt" - " USING (wire_target_h_payto)" - " JOIN known_coins kc" - " ON (kc.coin_pub = cdep.coin_pub)" - " JOIN denominations denoms" - " USING (denominations_serial)" + " JOIN batch_deposits bdep" + " USING (batch_deposit_serial_id)" + " JOIN wire_targets wt" + " USING (wire_target_h_payto)" + " JOIN known_coins kc" + " ON (kc.coin_pub = cdep.coin_pub)" + " JOIN denominations denoms" + " USING (denominations_serial)" " WHERE cdep.coin_pub=$1;"); PREPARE (pg, "get_refresh_session_by_coin", |