diff options
Diffstat (limited to 'src/exchangedb')
-rw-r--r-- | src/exchangedb/plugin_exchangedb_postgres.c | 8 | ||||
-rw-r--r-- | src/exchangedb/test_exchangedb.c | 3 |
2 files changed, 4 insertions, 7 deletions
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c index b9debfa44..526db5646 100644 --- a/src/exchangedb/plugin_exchangedb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -1778,18 +1778,12 @@ prepare_statements (struct PostgresClosure *pg) " FROM refunds" " WHERE coin_pub IN (SELECT coin_pub FROM dep)" " AND deposit_serial_id IN (SELECT deposit_serial_id FROM dep))" - " ,coins_with_fees AS (" /* find coins for which deposit fees apply */ - " SELECT" - " coin_pub" - " ,deposit_serial_id" /* ensures that if the same coin is deposited twice, it is in the list twice */ - " FROM dep" - " WHERE deposit_serial_id NOT IN (SELECT deposit_serial_id FROM ref))" " ,fees AS (" /* find deposit fees for non-refunded deposits */ " SELECT" " denom.fee_deposit_val AS fee_val" " ,denom.fee_deposit_frac AS fee_frac" " ,cs.deposit_serial_id" /* ensures we get the fee for each coin, not once per denomination */ - " FROM coins_with_fees cs" + " FROM dep cs" " JOIN known_coins kc" /* NOTE: may do a full join on the master, maybe find a left-join way to integrate with query above to push it to the shards? */ " USING (coin_pub)" " JOIN denominations denom" diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c index b6b8a46b3..db46aeae8 100644 --- a/src/exchangedb/test_exchangedb.c +++ b/src/exchangedb/test_exchangedb.c @@ -1397,6 +1397,7 @@ run (void *cls) { bool found; + bool nonce_ok; bool balance_ok; struct TALER_EXCHANGEDB_KycStatus kyc; uint64_t ruuid; @@ -1408,9 +1409,11 @@ run (void *cls) now, &found, &balance_ok, + &nonce_ok, &kyc, &ruuid)); GNUNET_assert (found); + GNUNET_assert (nonce_ok); GNUNET_assert (balance_ok); GNUNET_assert (! kyc.ok); } |