summaryrefslogtreecommitdiff
path: root/src/exchangedb
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-07-24 11:57:03 +0200
committerChristian Grothoff <christian@grothoff.org>2019-07-24 11:57:03 +0200
commit9e3f4bdd791f87df25cfd2b818c7ef385b78b35d (patch)
tree88f9fad664fbc84bc642381905bda6c65263dd67 /src/exchangedb
parent80ff1866489dc3c77e84dc4b8f793067ff586745 (diff)
downloadexchange-9e3f4bdd791f87df25cfd2b818c7ef385b78b35d.tar.gz
exchange-9e3f4bdd791f87df25cfd2b818c7ef385b78b35d.tar.bz2
exchange-9e3f4bdd791f87df25cfd2b818c7ef385b78b35d.zip
getting revocation/payback test with refreshed coins to pass
Diffstat (limited to 'src/exchangedb')
-rw-r--r--src/exchangedb/plugin_exchangedb_postgres.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c
index c95ed2616..72e77fa6b 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -2593,8 +2593,8 @@ postgres_insert_withdraw_info (void *cls,
now = GNUNET_TIME_absolute_get ();
(void) GNUNET_TIME_round_abs (&now);
qs = GNUNET_PQ_eval_prepared_non_select (session->conn,
- "insert_withdraw_info",
- params);
+ "insert_withdraw_info",
+ params);
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs)
{
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
@@ -2627,6 +2627,9 @@ postgres_insert_withdraw_info (void *cls,
TALER_B2S (&collectable->reserve_pub));
return GNUNET_DB_STATUS_SOFT_ERROR;
}
+ /* FIXME: idle_reserve_expiration_time is not a good value here,
+ we should base this on the LEGAL expiration time of coins
+ as we need reserve data for payback! */
expiry = GNUNET_TIME_absolute_add (now,
pg->idle_reserve_expiration_time);
reserve.expiry = GNUNET_TIME_absolute_max (expiry,
@@ -7721,11 +7724,12 @@ libtaler_plugin_exchangedb_postgres_init (void *cls)
return NULL;
}
}
+
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_time (cfg,
- "exchangedb",
- "IDLE_RESERVE_EXPIRATION_TIME",
- &pg->idle_reserve_expiration_time))
+ "exchangedb",
+ "IDLE_RESERVE_EXPIRATION_TIME",
+ &pg->idle_reserve_expiration_time))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
"exchangedb",