diff options
Diffstat (limited to 'src/exchangedb')
-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 |
3 files changed, 13 insertions, 9 deletions
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", |