fix cmd reserve close FTBFS

This commit is contained in:
Christian Grothoff 2022-10-12 11:32:58 +02:00
parent 5e2e71ec11
commit 3036c21283
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 6 additions and 5 deletions

View File

@ -86,6 +86,7 @@ libtalertesting_la_SOURCES = \
testing_api_cmd_refund.c \ testing_api_cmd_refund.c \
testing_api_cmd_refresh.c \ testing_api_cmd_refresh.c \
testing_api_cmd_reserve_attest.c \ testing_api_cmd_reserve_attest.c \
testing_api_cmd_reserve_close.c \
testing_api_cmd_reserve_get.c \ testing_api_cmd_reserve_get.c \
testing_api_cmd_reserve_get_attestable.c \ testing_api_cmd_reserve_get_attestable.c \
testing_api_cmd_reserve_history.c \ testing_api_cmd_reserve_history.c \

View File

@ -44,9 +44,9 @@ struct CloseState
struct TALER_EXCHANGE_ReservesCloseHandle *rsh; struct TALER_EXCHANGE_ReservesCloseHandle *rsh;
/** /**
* Expected reserve balance. * payto://-URI where to wire the funds.
*/ */
const char *expected_balance; const char *target_account;
/** /**
* Private key of the reserve being analyzed. * Private key of the reserve being analyzed.
@ -79,11 +79,10 @@ struct CloseState
*/ */
static void static void
reserve_close_cb (void *cls, reserve_close_cb (void *cls,
const struct TALER_EXCHANGE_ReserveClose *rs) const struct TALER_EXCHANGE_ReserveCloseResult *rs)
{ {
struct CloseState *ss = cls; struct CloseState *ss = cls;
struct TALER_TESTING_Interpreter *is = ss->is; struct TALER_TESTING_Interpreter *is = ss->is;
struct TALER_Amount eb;
ss->rsh = NULL; ss->rsh = NULL;
if (ss->expected_response_code != rs->hr.http_status) if (ss->expected_response_code != rs->hr.http_status)
@ -147,6 +146,7 @@ close_run (void *cls,
&ss->reserve_pub.eddsa_pub); &ss->reserve_pub.eddsa_pub);
ss->rsh = TALER_EXCHANGE_reserves_close (is->exchange, ss->rsh = TALER_EXCHANGE_reserves_close (is->exchange,
ss->reserve_priv, ss->reserve_priv,
ss->target_account,
&reserve_close_cb, &reserve_close_cb,
ss); ss);
} }
@ -189,7 +189,7 @@ TALER_TESTING_cmd_reserve_close (const char *label,
GNUNET_assert (NULL != reserve_reference); GNUNET_assert (NULL != reserve_reference);
ss = GNUNET_new (struct CloseState); ss = GNUNET_new (struct CloseState);
ss->reserve_reference = reserve_reference; ss->reserve_reference = reserve_reference;
ss->expected_balance = expected_balance; ss->target_account = target_account;
ss->expected_response_code = expected_response_code; ss->expected_response_code = expected_response_code;
{ {
struct TALER_TESTING_Command cmd = { struct TALER_TESTING_Command cmd = {