From caf6807856e3044f7e1065d84ca189e4d89b3b12 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 6 Aug 2021 10:20:58 +0200 Subject: -fix assertion failure caused by testcase --- src/testing/testing_api_cmd_insert_deposit.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'src/testing/testing_api_cmd_insert_deposit.c') diff --git a/src/testing/testing_api_cmd_insert_deposit.c b/src/testing/testing_api_cmd_insert_deposit.c index 607baeef3..b614702a3 100644 --- a/src/testing/testing_api_cmd_insert_deposit.c +++ b/src/testing/testing_api_cmd_insert_deposit.c @@ -81,8 +81,27 @@ struct InsertDepositState static void fake_issue (struct TALER_EXCHANGEDB_DenominationKeyInformationP *issue) { - memset (issue, 0, sizeof (struct - TALER_EXCHANGEDB_DenominationKeyInformationP)); + struct GNUNET_TIME_Absolute now; + + memset (issue, + 0, + sizeof (struct TALER_EXCHANGEDB_DenominationKeyInformationP)); + now = GNUNET_TIME_absolute_get (); + (void) GNUNET_TIME_round_abs (&now); + issue->properties.start + = GNUNET_TIME_absolute_hton (now); + issue->properties.expire_withdraw + = GNUNET_TIME_absolute_hton ( + GNUNET_TIME_absolute_add (now, + GNUNET_TIME_UNIT_MINUTES)); + issue->properties.expire_deposit + = GNUNET_TIME_absolute_hton ( + GNUNET_TIME_absolute_add (now, + GNUNET_TIME_UNIT_HOURS)); + issue->properties.expire_legal + = GNUNET_TIME_absolute_hton ( + GNUNET_TIME_absolute_add (now, + GNUNET_TIME_UNIT_DAYS)); GNUNET_assert (GNUNET_OK == TALER_string_to_amount_nbo ("EUR:1", &issue->properties.value)); -- cgit v1.2.3