summaryrefslogtreecommitdiff
path: root/src/mintdb/plugin_mintdb_postgres.c
diff options
context:
space:
mode:
authorFournier Nicolas <nicolas.fournier@ensta-paristech.fr>2015-07-01 10:15:12 +0200
committerFournier Nicolas <nicolas.fournier@ensta-paristech.fr>2015-07-01 10:15:12 +0200
commitdde86c97dd28adc8aff08ed28f80af0ddc6c2b9e (patch)
tree0f383a89b353999ed0b43037d89a7d78d200156b /src/mintdb/plugin_mintdb_postgres.c
parent17ae8871be76cb6f9357763d70c504dd2eb34106 (diff)
parent01b2a257b1add6809ffa734b2fe6bc9ac87f5477 (diff)
downloadexchange-dde86c97dd28adc8aff08ed28f80af0ddc6c2b9e.tar.gz
exchange-dde86c97dd28adc8aff08ed28f80af0ddc6c2b9e.tar.bz2
exchange-dde86c97dd28adc8aff08ed28f80af0ddc6c2b9e.zip
Merge branch 'master' of taler.net:/var/git/mint
Diffstat (limited to 'src/mintdb/plugin_mintdb_postgres.c')
-rw-r--r--src/mintdb/plugin_mintdb_postgres.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mintdb/plugin_mintdb_postgres.c b/src/mintdb/plugin_mintdb_postgres.c
index 836a8a8c8..81a372e4a 100644
--- a/src/mintdb/plugin_mintdb_postgres.c
+++ b/src/mintdb/plugin_mintdb_postgres.c
@@ -1284,6 +1284,7 @@ reserves_update (void *cls,
* @param session the database connection handle
* @param reserve_pub public key of the reserve
* @param balance the amount that has to be added to the reserve
+ * @param execution_time when was the amount added
* @param details bank transaction details justifying the increment,
* must be unique for each incoming transaction
* @return #GNUNET_OK upon success; #GNUNET_NO if the given
@@ -1295,12 +1296,12 @@ postgres_reserves_in_insert (void *cls,
struct TALER_MINTDB_Session *session,
const struct TALER_ReservePublicKeyP *reserve_pub,
const struct TALER_Amount *balance,
+ struct GNUNET_TIME_Absolute execution_time,
const json_t *details)
{
PGresult *result;
int reserve_exists;
struct TALER_MINTDB_Reserve reserve;
- struct GNUNET_TIME_Absolute now;
struct GNUNET_TIME_Absolute expiry;
if (GNUNET_OK != postgres_start (cls,
@@ -1318,8 +1319,7 @@ postgres_reserves_in_insert (void *cls,
GNUNET_break (0);
goto rollback;
}
- now = GNUNET_TIME_absolute_get ();
- expiry = GNUNET_TIME_absolute_add (now,
+ expiry = GNUNET_TIME_absolute_add (execution_time,
TALER_IDLE_RESERVE_EXPIRATION_TIME);
if (GNUNET_NO == reserve_exists)
{
@@ -1358,7 +1358,7 @@ postgres_reserves_in_insert (void *cls,
TALER_PQ_query_param_auto_from_type (&reserve.pub),
TALER_PQ_query_param_amount (balance),
TALER_PQ_query_param_json (details),
- TALER_PQ_query_param_absolute_time (&now),
+ TALER_PQ_query_param_absolute_time (&execution_time),
TALER_PQ_query_param_end
};