From e54402d392c25aa0476308d51bcc75ce84178dc3 Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Mon, 13 Jan 2020 11:35:07 +0100 Subject: fix compilation after exchange refactor --- src/merchant-tools/taler-merchant-benchmark.c | 56 ++++++++++++++++++--------- 1 file changed, 37 insertions(+), 19 deletions(-) (limited to 'src/merchant-tools/taler-merchant-benchmark.c') diff --git a/src/merchant-tools/taler-merchant-benchmark.c b/src/merchant-tools/taler-merchant-benchmark.c index 49c3cdd7..d9c6dcc4 100644 --- a/src/merchant-tools/taler-merchant-benchmark.c +++ b/src/merchant-tools/taler-merchant-benchmark.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include "taler_merchant_testing_lib.h" @@ -55,26 +54,16 @@ enum PaymentGeneratorError /* Hard-coded params. Note, the bank is expected to * have the Tor user with account number 3 and password 'x'. - * - * This is not a problem _so far_, as the fakebank mocks logins, - * and the Python bank makes that account by default. */ -#define USER_ACCOUNT_NO 3 + */ +#define PAYER_URL "FIXME/3" #define EXCHANGE_ACCOUNT_NO 2 #define USER_LOGIN_NAME "Tor" #define USER_LOGIN_PASS "x" #define EXCHANGE_URL "http://example.com/" - #define FIRST_INSTRUCTION -1 #define TRACKS_INSTRUCTION 9 #define TWOCOINS_INSTRUCTION 5 -#define CMD_TRANSFER_TO_EXCHANGE(label,amount) \ - TALER_TESTING_cmd_fakebank_transfer (label, amount, \ - bank_url, USER_ACCOUNT_NO, \ - EXCHANGE_ACCOUNT_NO, \ - USER_LOGIN_NAME, USER_LOGIN_PASS, \ - EXCHANGE_URL) - /** * Help string shown if NO subcommand is given on command line. */ @@ -179,6 +168,14 @@ static char *merchant_url; */ static char *currency; +/** + * Authentication data to use. FIXME: init ! + */ +static struct TALER_BANK_AuthenticationData auth; + +static char *exchange_payto; +static struct TALER_WireTransferIdentifierRawP wtid; + /** * Convenience macros to allocate all the currency-dependant * strings; note that the argument list of the macro is ignored. @@ -336,9 +333,14 @@ run (void *cls, struct TALER_TESTING_Command ordinary_commands[] = { - CMD_TRANSFER_TO_EXCHANGE + TALER_TESTING_cmd_transfer ("create-reserve-1", - CURRENCY_10_02), + CURRENCY_10_02, + PAYER_URL, // bank base URL + path to the payer account. + &auth, + exchange_payto, + &wtid, + EXCHANGE_URL), TALER_TESTING_cmd_exec_wirewatch ("wirewatch-1", @@ -425,9 +427,14 @@ run (void *cls, struct TALER_TESTING_Command corner_commands[] = { - CMD_TRANSFER_TO_EXCHANGE + TALER_TESTING_cmd_transfer ("create-reserve-1", - CURRENCY_5_01), + CURRENCY_5_01, + PAYER_URL, + &auth, + exchange_payto, + &wtid, + EXCHANGE_URL), TALER_TESTING_cmd_exec_wirewatch ("wirewatch-1", @@ -460,9 +467,14 @@ run (void *cls, FIRST_INSTRUCTION, &unaggregated_number), - CMD_TRANSFER_TO_EXCHANGE + TALER_TESTING_cmd_transfer ("create-reserve-2", - CURRENCY_10_02), + CURRENCY_10_02, + PAYER_URL, + &auth, + exchange_payto, + &wtid, + EXCHANGE_URL), TALER_TESTING_cmd_exec_wirewatch ("wirewatch-2", @@ -785,6 +797,12 @@ main (int argc, return FAILED_TO_LAUNCH_BANK; } + /** + * FIXME: Need to retrieve the bank base URL! + */ + exchange_payto = TALER_TESTING_make_xtalerbank_payto ("FIXME-BANK-HOSTNAME:PORT", + "/2"); + result = TALER_TESTING_setup_with_exchange (run, NULL, -- cgit v1.2.3