From 518c7009e7b19d681852a91e30028d37e6f55cd1 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 15 Oct 2022 22:03:55 +0200 Subject: handle reserve open/close responses in reserve history in libtalerexchange --- src/testing/testing_api_cmd_common.c | 8 +++++++- src/testing/testing_api_cmd_exec_closer.c | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'src/testing') diff --git a/src/testing/testing_api_cmd_common.c b/src/testing/testing_api_cmd_common.c index 138e5502a..bb0eb3f04 100644 --- a/src/testing/testing_api_cmd_common.c +++ b/src/testing/testing_api_cmd_common.c @@ -70,7 +70,7 @@ TALER_TESTING_history_entry_cmp ( &h2->details.recoup_details.coin_pub)) ) return 0; return 1; - case TALER_EXCHANGE_RTT_CLOSE: + case TALER_EXCHANGE_RTT_CLOSING: /* testing_api_cmd_exec_closer doesn't set the receiver_account_details, exchange_sig, exchange_pub or wtid or timestamp so we cannot test for it here. but if the amount matches, @@ -130,6 +130,12 @@ TALER_TESTING_history_entry_cmp ( h2->details.merge_details.flags) ) return 0; return 1; + case TALER_EXCHANGE_RTT_OPEN: + // FIXME: verify response... + return 1; + case TALER_EXCHANGE_RTT_CLOSE: + // FIXME: verify response... + return 1; } GNUNET_assert (0); return 1; diff --git a/src/testing/testing_api_cmd_exec_closer.c b/src/testing/testing_api_cmd_exec_closer.c index 75eab2d9f..9ee436af0 100644 --- a/src/testing/testing_api_cmd_exec_closer.c +++ b/src/testing/testing_api_cmd_exec_closer.c @@ -221,11 +221,11 @@ TALER_TESTING_cmd_exec_closer (const char *label, /* expected amount includes fee, while our argument gives the amount _without_ the fee. So add the fee. */ GNUNET_assert (0 <= - TALER_amount_add (&as->reserve_history.amount, - &as->reserve_history.amount, - &as->reserve_history.details.close_details. - fee)); - as->reserve_history.type = TALER_EXCHANGE_RTT_CLOSE; + TALER_amount_add ( + &as->reserve_history.amount, + &as->reserve_history.amount, + &as->reserve_history.details.close_details.fee)); + as->reserve_history.type = TALER_EXCHANGE_RTT_CLOSING; } { struct TALER_TESTING_Command cmd = { -- cgit v1.2.3