From 1acc851deb38c52e4212823100eec8a00d5f385a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 16 Dec 2021 20:18:44 +0100 Subject: -fix recoup ugliness --- src/exchangedb/test_exchangedb.c | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) (limited to 'src/exchangedb/test_exchangedb.c') diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c index a8a9f3e16..65689d872 100644 --- a/src/exchangedb/test_exchangedb.c +++ b/src/exchangedb/test_exchangedb.c @@ -238,23 +238,26 @@ create_denom_key_pair (unsigned int size, sizeof (struct TALER_EXCHANGEDB_DenominationKey)); dki.denom_pub = dkp->pub; dki.issue.properties.start = GNUNET_TIME_timestamp_hton (now); - dki.issue.properties.expire_withdraw = GNUNET_TIME_timestamp_hton - (GNUNET_TIME_absolute_to_timestamp - (GNUNET_TIME_absolute_add ( - now.abs_time, - GNUNET_TIME_UNIT_HOURS))); - dki.issue.properties.expire_deposit = GNUNET_TIME_timestamp_hton ( - GNUNET_TIME_absolute_to_timestamp - (GNUNET_TIME_absolute_add - (now.abs_time, - GNUNET_TIME_relative_multiply ( - GNUNET_TIME_UNIT_HOURS, 2)))); - dki.issue.properties.expire_legal = GNUNET_TIME_timestamp_hton ( - GNUNET_TIME_absolute_to_timestamp - (GNUNET_TIME_absolute_add - (now.abs_time, - GNUNET_TIME_relative_multiply ( - GNUNET_TIME_UNIT_HOURS, 3)))); + dki.issue.properties.expire_withdraw + = GNUNET_TIME_timestamp_hton + (GNUNET_TIME_absolute_to_timestamp + (GNUNET_TIME_absolute_add ( + now.abs_time, + GNUNET_TIME_UNIT_HOURS))); + dki.issue.properties.expire_deposit + = GNUNET_TIME_timestamp_hton ( + GNUNET_TIME_absolute_to_timestamp + (GNUNET_TIME_absolute_add + (now.abs_time, + GNUNET_TIME_relative_multiply ( + GNUNET_TIME_UNIT_HOURS, 2)))); + dki.issue.properties.expire_legal + = GNUNET_TIME_timestamp_hton ( + GNUNET_TIME_absolute_to_timestamp + (GNUNET_TIME_absolute_add + (now.abs_time, + GNUNET_TIME_relative_multiply ( + GNUNET_TIME_UNIT_HOURS, 3)))); TALER_amount_hton (&dki.issue.properties.value, value); TALER_amount_hton (&dki.issue.properties.fee_withdraw, fee_withdraw); TALER_amount_hton (&dki.issue.properties.fee_deposit, fee_deposit); @@ -276,6 +279,8 @@ create_denom_key_pair (unsigned int size, destroy_denom_key_pair (dkp); return NULL; } + memset (&issue2, 0, sizeof (issue2)); + plugin->commit (plugin->cls); if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != plugin->get_denomination_info (plugin->cls, &dki.issue.properties.denom_hash, -- cgit v1.2.3