diff options
| author | Christian Grothoff <christian@grothoff.org> | 2022-10-15 22:03:55 +0200 | 
|---|---|---|
| committer | Christian Grothoff <christian@grothoff.org> | 2022-10-15 22:03:55 +0200 | 
| commit | 518c7009e7b19d681852a91e30028d37e6f55cd1 (patch) | |
| tree | eec2be67afe07b914c782d9ec4564c9f9cd89c1a /src/testing | |
| parent | 7421142bc105342043ae3b54cad2c445ef58e193 (diff) | |
handle reserve open/close responses in reserve history in libtalerexchange
Diffstat (limited to 'src/testing')
| -rw-r--r-- | src/testing/testing_api_cmd_common.c | 8 | ||||
| -rw-r--r-- | src/testing/testing_api_cmd_exec_closer.c | 10 | 
2 files changed, 12 insertions, 6 deletions
| diff --git a/src/testing/testing_api_cmd_common.c b/src/testing/testing_api_cmd_common.c index 138e5502..bb0eb3f0 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 75eab2d9..9ee436af 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 = { | 
