diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-12-09 19:57:34 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-12-09 19:57:34 +0100 |
commit | b5222ad829c41ea9be890113e94ba6a96fcaedbc (patch) | |
tree | 95d2876ca6bcf8a2afd5cb20a504bc21d8a33362 /src/backenddb | |
parent | cea6fc540c1038877b6ea8b14a4014d192aae515 (diff) | |
download | merchant-b5222ad829c41ea9be890113e94ba6a96fcaedbc.tar.gz merchant-b5222ad829c41ea9be890113e94ba6a96fcaedbc.tar.bz2 merchant-b5222ad829c41ea9be890113e94ba6a96fcaedbc.zip |
fix issues related to unrounded times
Diffstat (limited to 'src/backenddb')
-rw-r--r-- | src/backenddb/plugin_merchantdb_postgres.c | 3 | ||||
-rw-r--r-- | src/backenddb/test_merchantdb.c | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c index 6647a5ae..835f2e68 100644 --- a/src/backenddb/plugin_merchantdb_postgres.c +++ b/src/backenddb/plugin_merchantdb_postgres.c @@ -2663,6 +2663,7 @@ postgres_enable_tip_reserve (void *cls, }; now = GNUNET_TIME_absolute_get (); + (void) GNUNET_TIME_round_abs (&now); qs = GNUNET_PQ_eval_prepared_non_select (pg->conn, "insert_tip_credit_uuid", params); @@ -2895,7 +2896,7 @@ postgres_authorize_tip (void *cls, GNUNET_PQ_query_param_end }; - GNUNET_TIME_round_abs (&now); + (void) GNUNET_TIME_round_abs (&now); qs = GNUNET_PQ_eval_prepared_non_select (pg->conn, "insert_tip_justification", params); diff --git a/src/backenddb/test_merchantdb.c b/src/backenddb/test_merchantdb.c index 62a6c5e4..942660a2 100644 --- a/src/backenddb/test_merchantdb.c +++ b/src/backenddb/test_merchantdb.c @@ -392,6 +392,7 @@ test_wire_fee () RND_BLK (&h_wire_method); RND_BLK (&exchange_sig); date1 = GNUNET_TIME_absolute_get (); + (void) GNUNET_TIME_abs_round (&date1); date2 = GNUNET_TIME_absolute_add (date1, GNUNET_TIME_UNIT_DAYS); date3 = GNUNET_TIME_absolute_add (date2, @@ -799,11 +800,11 @@ run (void *cls) RND_BLK (&merchant_pub); RND_BLK (&wtid); timestamp = GNUNET_TIME_absolute_get (); - GNUNET_TIME_round_abs (×tamp); + (void) GNUNET_TIME_round_abs (×tamp); delta = GNUNET_TIME_UNIT_MINUTES; fake_now = GNUNET_TIME_absolute_add (timestamp, delta); refund_deadline = GNUNET_TIME_absolute_get(); - GNUNET_TIME_round_abs (&refund_deadline); + (void) GNUNET_TIME_round_abs (&refund_deadline); GNUNET_assert (GNUNET_OK == TALER_string_to_amount (CURRENCY ":5", &amount_with_fee)); @@ -894,7 +895,7 @@ run (void *cls) &pd_cb, NULL)); timestamp = GNUNET_TIME_absolute_get (); - GNUNET_TIME_round_abs (×tamp); + (void) GNUNET_TIME_round_abs (×tamp); FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != plugin->insert_contract_terms (plugin->cls, |