summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_purse_create_deposit.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-04-24 15:29:50 +0200
committerChristian Grothoff <christian@grothoff.org>2022-04-24 15:29:58 +0200
commitaedd2014ec50e2b52cad76d9c40c218ed0c9ccfc (patch)
tree3b4ef17e90f152a161c6929fbe1da07c366a4268 /src/testing/testing_api_cmd_purse_create_deposit.c
parent36c568ab8df9b8e523c9ffc45271533af77accc7 (diff)
downloadexchange-aedd2014ec50e2b52cad76d9c40c218ed0c9ccfc.tar.gz
exchange-aedd2014ec50e2b52cad76d9c40c218ed0c9ccfc.tar.bz2
exchange-aedd2014ec50e2b52cad76d9c40c218ed0c9ccfc.zip
-misc p2p fixes
Diffstat (limited to 'src/testing/testing_api_cmd_purse_create_deposit.c')
-rw-r--r--src/testing/testing_api_cmd_purse_create_deposit.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/testing/testing_api_cmd_purse_create_deposit.c b/src/testing/testing_api_cmd_purse_create_deposit.c
index 13b2dffa6..ef98c9055 100644
--- a/src/testing/testing_api_cmd_purse_create_deposit.c
+++ b/src/testing/testing_api_cmd_purse_create_deposit.c
@@ -259,17 +259,23 @@ deposit_run (void *cls,
GNUNET_CRYPTO_eddsa_key_create (&ds->purse_priv.eddsa_priv);
GNUNET_CRYPTO_eddsa_key_create (&ds->merge_priv.eddsa_priv);
GNUNET_CRYPTO_ecdhe_key_create (&ds->contract_priv.ecdhe_priv);
- ds->purse_expiration
- = GNUNET_TIME_relative_to_timestamp (ds->rel_expiration);
GNUNET_CRYPTO_eddsa_key_get_public (&ds->purse_priv.eddsa_priv,
&ds->purse_pub.eddsa_pub);
+
+ ds->purse_expiration =
+ GNUNET_TIME_absolute_to_timestamp (
+ GNUNET_TIME_relative_to_absolute (ds->rel_expiration));
+ GNUNET_assert (0 ==
+ json_object_set_new (
+ ds->contract_terms,
+ "pay_deadline",
+ GNUNET_JSON_from_timestamp (ds->purse_expiration)));
ds->dh = TALER_EXCHANGE_purse_create_with_deposit (
is->exchange,
&ds->purse_priv,
&ds->merge_priv,
&ds->contract_priv,
ds->contract_terms,
- ds->purse_expiration,
ds->num_coin_references,
deposits,
ds->upload_contract,
@@ -361,7 +367,6 @@ TALER_TESTING_cmd_purse_create_with_deposit (
...)
{
struct PurseCreateDepositState *ds;
- struct GNUNET_TIME_Timestamp pay_deadline;
ds = GNUNET_new (struct PurseCreateDepositState);
ds->rel_expiration = purse_expiration;
@@ -378,14 +383,6 @@ TALER_TESTING_cmd_purse_create_with_deposit (
label);
GNUNET_assert (0);
}
- pay_deadline =
- GNUNET_TIME_absolute_to_timestamp (
- GNUNET_TIME_relative_to_absolute (purse_expiration));
- GNUNET_assert (0 ==
- json_object_set_new (
- ds->contract_terms,
- "pay_deadline",
- GNUNET_JSON_from_timestamp (pay_deadline)));
{
va_list ap;
unsigned int i;