summaryrefslogtreecommitdiff
path: root/src/backenddb/plugin_merchantdb_postgres.c
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2017-06-13 15:39:08 +0200
committerMarcello Stanisci <marcello.stanisci@inria.fr>2017-06-13 15:39:08 +0200
commit3f550d5d651739eae24ecf2abfc709f12bab2e1c (patch)
treef0f2cbf976f9ce43cc3f595291eb60535e709d3a /src/backenddb/plugin_merchantdb_postgres.c
parent48064a2b4fa6d033b7dcc7170f50cafbe3d4d2f3 (diff)
downloadmerchant-3f550d5d651739eae24ecf2abfc709f12bab2e1c.tar.gz
merchant-3f550d5d651739eae24ecf2abfc709f12bab2e1c.tar.bz2
merchant-3f550d5d651739eae24ecf2abfc709f12bab2e1c.zip
drop refund table
Diffstat (limited to 'src/backenddb/plugin_merchantdb_postgres.c')
-rw-r--r--src/backenddb/plugin_merchantdb_postgres.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c
index 11cd21d3..ed7a74e2 100644
--- a/src/backenddb/plugin_merchantdb_postgres.c
+++ b/src/backenddb/plugin_merchantdb_postgres.c
@@ -120,6 +120,7 @@ postgres_drop_tables (void *cls)
GNUNET_PQ_make_try_execute ("DROP TABLE merchant_transactions;"),
GNUNET_PQ_make_try_execute ("DROP TABLE merchant_proofs;"),
GNUNET_PQ_make_try_execute ("DROP TABLE merchant_contract_terms;"),
+ GNUNET_PQ_make_try_execute ("DROP TABLE merchant_refunds;"),
GNUNET_PQ_EXECUTE_STATEMENT_END
};
@@ -1993,7 +1994,6 @@ process_deposits_cb (void *cls,
/*Always commit the smallest as refund*/
- /*Empirically, INSERT returns 1 result*/
if (1 != insert_refund (ctx->pg,
ctx->h_contract_terms,
&coin_pub,
@@ -2023,6 +2023,10 @@ process_deposits_cb (void *cls,
if (-1 == TALER_amount_cmp (ctx->refund, &previous_refund))
{
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Attempted refund lesser than the previous awarded one. %s vs %s\n",
+ TALER_amount_to_string (ctx->refund),
+ TALER_amount_to_string (&previous_refund));
ctx->err = GNUNET_NO;
return;
}