summaryrefslogtreecommitdiff
path: root/src/exchangedb/plugin_exchangedb_postgres.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-11-19 22:01:17 +0100
committerChristian Grothoff <christian@grothoff.org>2017-11-19 22:01:29 +0100
commit029d3239e12f99012b4e8082aec6e9f8098e0435 (patch)
tree89a6bb102da518c290244a8df043eb7ed1609758 /src/exchangedb/plugin_exchangedb_postgres.c
parent6d845c951efccb2f44a8aa76d64944e6c42c44b7 (diff)
downloadexchange-029d3239e12f99012b4e8082aec6e9f8098e0435.tar.gz
exchange-029d3239e12f99012b4e8082aec6e9f8098e0435.tar.bz2
exchange-029d3239e12f99012b4e8082aec6e9f8098e0435.zip
test select_deposits_missing_wire, fix uninitialized wire_deadline in deposit listing
Diffstat (limited to 'src/exchangedb/plugin_exchangedb_postgres.c')
-rw-r--r--src/exchangedb/plugin_exchangedb_postgres.c7
1 files changed, 5 insertions, 2 deletions
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",