diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-08-06 10:20:58 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-08-06 10:20:58 +0200 |
commit | caf6807856e3044f7e1065d84ca189e4d89b3b12 (patch) | |
tree | ef450f7eee7a4496becfd1ecd2cc4221fa8bc686 /src/testing/testing_api_cmd_insert_deposit.c | |
parent | c71c40d4d62d55730dad032c3ef9f8f645a07efd (diff) | |
download | exchange-caf6807856e3044f7e1065d84ca189e4d89b3b12.tar.xz |
-fix assertion failure caused by testcase
Diffstat (limited to 'src/testing/testing_api_cmd_insert_deposit.c')
-rw-r--r-- | src/testing/testing_api_cmd_insert_deposit.c | 23 |
1 files changed, 21 insertions, 2 deletions
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)); |