[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] branch master updated: payments generator
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] branch master updated: payments generator does real timestamps |
Date: |
Fri, 07 Jul 2017 22:37:03 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new fd6227f payments generator does real timestamps
fd6227f is described below
commit fd6227fc73e9e2e6f8a72a4186338f9bc6072b3b
Author: Marcello Stanisci <address@hidden>
AuthorDate: Fri Jul 7 22:36:35 2017 +0200
payments generator does real timestamps
---
src/merchant-tools/taler-merchant-generate-payments.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/merchant-tools/taler-merchant-generate-payments.c
b/src/merchant-tools/taler-merchant-generate-payments.c
index 8ba3704..bf5ecad 100644
--- a/src/merchant-tools/taler-merchant-generate-payments.c
+++ b/src/merchant-tools/taler-merchant-generate-payments.c
@@ -781,11 +781,18 @@ make_order (char *maxfee,
json_t *maxfee_j;
json_t *ret;
unsigned long long id;
+ struct GNUNET_TIME_Absolute now;
+ char *timestamp;
TALER_string_to_amount (maxfee, &tmp_amount);
maxfee_j = TALER_JSON_from_amount (&tmp_amount);
TALER_string_to_amount (total, &tmp_amount);
total_j = TALER_JSON_from_amount (&tmp_amount);
+ now = GNUNET_TIME_absolute_get ();
+
+ GNUNET_asprintf (×tamp,
+ "/Date(%u)/",
+ now.abs_value_us / 1000LL / 1000LL);
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK,
&id,
@@ -793,7 +800,7 @@ make_order (char *maxfee,
ret = json_pack ("{s:o, s:s, s:s, s:s, s:s, s:o, s:s, s:[{s:s}]}",
"max_fee", maxfee_j,
"order_id", TALER_b2s (&id, sizeof (id)),
- "timestamp", "/Date(42)/",
+ "timestamp", timestamp,
"refund_deadline", "/Date(0)/",
"pay_deadline", "/Date(9999999999)/",
"amount", total_j,
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-merchant] branch master updated: payments generator does real timestamps,
gnunet <=