exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 6e90ef9f4a8ab5352a948fd7fd4de9150a778ce5
parent bf92166be3af89313f2e59ca64ecb716c0ca760d
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 10 Apr 2016 02:43:09 +0200

implement selection by wire_deadline as documented

Diffstat:
Msrc/exchangedb/plugin_exchangedb_postgres.c | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c @@ -950,10 +950,11 @@ postgres_prepare (PGconn *db_conn) " FROM deposits" " WHERE" " tiny=false AND" - " done=false" + " done=false AND" + " wire_deadline<$1" " ORDER BY wire_deadline ASC" " LIMIT 1", - 0, NULL); + 1, NULL); /* Used in #postgres_iterate_matching_deposits() */ PREPARE ("deposits_iterate_matching", @@ -2231,7 +2232,9 @@ postgres_get_ready_deposit (void *cls, TALER_EXCHANGEDB_DepositIterator deposit_cb, void *deposit_cb_cls) { + struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get (); struct GNUNET_PQ_QueryParam params[] = { + GNUNET_PQ_query_param_absolute_time (&now), GNUNET_PQ_query_param_end }; PGresult *result;