commit 40244c9ca8b2c6af15fa6020236649ec316a5f29
parent 042616899f89d38167632e3ff24b16469a27fbef
Author: Christian Grothoff <christian@grothoff.org>
Date: Fri, 8 Dec 2017 12:45:25 +0100
fix reservemod issue with time rounding
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/exchange-tools/taler-exchange-reservemod.c b/src/exchange-tools/taler-exchange-reservemod.c
@@ -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));