From 029d3239e12f99012b4e8082aec6e9f8098e0435 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 19 Nov 2017 22:01:17 +0100 Subject: test select_deposits_missing_wire, fix uninitialized wire_deadline in deposit listing --- src/exchangedb/plugin_exchangedb_postgres.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/exchangedb/plugin_exchangedb_postgres.c') diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c index 0faf126e1..93a8c1a8b 100644 --- a/src/exchangedb/plugin_exchangedb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -1100,6 +1100,7 @@ postgres_prepare (PGconn *db_conn) ",denom.fee_deposit_curr" ",timestamp" ",refund_deadline" + ",wire_deadline" ",merchant_pub" ",h_contract_terms" ",h_wire" @@ -1313,8 +1314,8 @@ postgres_prepare (PGconn *db_conn) ",tiny" ",done" " FROM deposits" - " WHERE wire_deadline <= $1" - " AND wire_deadline > $2" + " WHERE wire_deadline >= $1" + " AND wire_deadline < $2" " AND NOT (EXISTS (SELECT 1" " FROM refunds" " WHERE (refunds.coin_pub = deposits.coin_pub))" @@ -3833,6 +3834,8 @@ add_coin_deposit (void *cls, &deposit->timestamp), GNUNET_PQ_result_spec_absolute_time ("refund_deadline", &deposit->refund_deadline), + GNUNET_PQ_result_spec_absolute_time ("wire_deadline", + &deposit->wire_deadline), GNUNET_PQ_result_spec_auto_from_type ("merchant_pub", &deposit->merchant_pub), GNUNET_PQ_result_spec_auto_from_type ("h_contract_terms", -- cgit v1.2.3