fix reservemod issue with time rounding

This commit is contained in:
Christian Grothoff 2017-12-08 12:45:25 +01:00
parent 042616899f
commit 40244c9ca8
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -81,6 +81,7 @@ run_transaction (const struct TALER_ReservePublicKeyP *reserve_pub,
int ret;
struct TALER_EXCHANGEDB_Session *session;
void *json_str;
struct GNUNET_TIME_Absolute now;
session = plugin->get_session (plugin->cls);
if (NULL == session)
@ -97,11 +98,13 @@ run_transaction (const struct TALER_ReservePublicKeyP *reserve_pub,
GNUNET_break (0); /* out of memory? */
return GNUNET_SYSERR;
}
now = GNUNET_TIME_absolute_get ();
(void) GNUNET_TIME_round_abs (&now);
ret = plugin->reserves_in_insert (plugin->cls,
session,
reserve_pub,
add_value,
GNUNET_TIME_absolute_get (),
now,
jdetails,
json_str,
strlen (json_str));