From aedd2014ec50e2b52cad76d9c40c218ed0c9ccfc Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 24 Apr 2022 15:29:50 +0200 Subject: -misc p2p fixes --- src/testing/testing_api_cmd_purse_merge.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/testing/testing_api_cmd_purse_merge.c') diff --git a/src/testing/testing_api_cmd_purse_merge.c b/src/testing/testing_api_cmd_purse_merge.c index a17f8a9d7..27aa120ed 100644 --- a/src/testing/testing_api_cmd_purse_merge.c +++ b/src/testing/testing_api_cmd_purse_merge.c @@ -128,7 +128,7 @@ merge_run (void *cls, const struct TALER_PurseMergePrivateKeyP *merge_priv; const json_t *ct; struct TALER_PrivateContractHashP h_contract_terms; - uint32_t min_age; + uint32_t min_age = 0; struct TALER_Amount value_after_fees; struct GNUNET_TIME_Timestamp purse_expiration; const struct TALER_TESTING_Command *ref; @@ -172,6 +172,8 @@ merge_run (void *cls, } { struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_timestamp ("pay_deadline", + &purse_expiration), TALER_JSON_spec_amount_any ("amount", &value_after_fees), GNUNET_JSON_spec_mark_optional ( @@ -192,9 +194,6 @@ merge_run (void *cls, } } - // FIXME: how to get purse_expiration nicely!?!? - // See create_with_deposit FIXME: from pay deadline? - if (NULL == ds->reserve_ref) { GNUNET_CRYPTO_eddsa_key_create (&ds->reserve_priv.eddsa_priv); @@ -204,7 +203,7 @@ merge_run (void *cls, const struct TALER_ReservePrivateKeyP *rp; ref = TALER_TESTING_interpreter_lookup_command (ds->is, - ds->merge_ref); + ds->reserve_ref); GNUNET_assert (NULL != ref); if (GNUNET_OK != TALER_TESTING_get_trait_reserve_priv (ref, -- cgit v1.2.3