diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/benchmark/benchmark-cs.conf | 2 | ||||
-rw-r--r-- | src/benchmark/benchmark-rsa.conf | 2 | ||||
-rw-r--r-- | src/benchmark/taler-exchange-benchmark.c | 18 | ||||
-rw-r--r-- | src/exchange-tools/taler-exchange-offline.c | 60 |
4 files changed, 48 insertions, 34 deletions
diff --git a/src/benchmark/benchmark-cs.conf b/src/benchmark/benchmark-cs.conf index d0d14b8d9..79721be14 100644 --- a/src/benchmark/benchmark-cs.conf +++ b/src/benchmark/benchmark-cs.conf @@ -12,6 +12,7 @@ CURRENCY_ROUND_UNIT = EUR:0.01 [exchange] +AML_THRESHOLD = EUR:99999999 SIGNKEY_LEGAL_DURATION = 2 years # HTTP port the exchange listens to @@ -50,6 +51,7 @@ HTTP_PORT = 8082 SERVE = http MAX_DEBT = EUR:100000000000.0 MAX_DEBT_BANK = EUR:1000000000000000.0 +DATABASE = bank-db.sqlite3 [benchmark] USER_PAYTO_URI = payto://x-taler-bank/localhost:8082/42 diff --git a/src/benchmark/benchmark-rsa.conf b/src/benchmark/benchmark-rsa.conf index 7b5b0d1f1..5e44781d1 100644 --- a/src/benchmark/benchmark-rsa.conf +++ b/src/benchmark/benchmark-rsa.conf @@ -12,6 +12,7 @@ CURRENCY_ROUND_UNIT = EUR:0.01 [exchange] +AML_THRESHOLD = EUR:99999999 SIGNKEY_LEGAL_DURATION = 2 years # HTTP port the exchange listens to @@ -50,6 +51,7 @@ HTTP_PORT = 8082 SERVE = http MAX_DEBT = EUR:100000000000.0 MAX_DEBT_BANK = EUR:1000000000000000.0 +DATABASE = bank-db.sqlite3 [benchmark] USER_PAYTO_URI = payto://x-taler-bank/localhost:8082/42 diff --git a/src/benchmark/taler-exchange-benchmark.c b/src/benchmark/taler-exchange-benchmark.c index fd7553813..993b66811 100644 --- a/src/benchmark/taler-exchange-benchmark.c +++ b/src/benchmark/taler-exchange-benchmark.c @@ -1061,24 +1061,6 @@ main (int argc, } if ( (MODE_EXCHANGE == mode) || (MODE_BOTH == mode) ) { - struct GNUNET_OS_Process *compute_wire_response; - - compute_wire_response - = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_ALL, - NULL, NULL, NULL, - "taler-exchange-wire", - "taler-exchange-wire", - "-c", cfg_filename, - NULL); - if (NULL == compute_wire_response) - { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Failed to run `taler-exchange-wire`, is your PATH correct?\n"); - GNUNET_free (cfg_filename); - return BAD_CONFIG_FILE; - } - GNUNET_OS_process_wait (compute_wire_response); - GNUNET_OS_process_destroy (compute_wire_response); /* If we use the fakebank, we MUST reset the database as the fakebank will have forgotten everything... */ GNUNET_assert (GNUNET_OK == diff --git a/src/exchange-tools/taler-exchange-offline.c b/src/exchange-tools/taler-exchange-offline.c index 80765dd9b..b1aababc4 100644 --- a/src/exchange-tools/taler-exchange-offline.c +++ b/src/exchange-tools/taler-exchange-offline.c @@ -3397,14 +3397,28 @@ do_set_global_fee (char *const *args) (NULL == args[3]) || (NULL == args[4]) || (NULL == args[5]) || - (NULL == args[6]) || - ( (1 != sscanf (args[0], - "%u%c", - &year, - &dummy)) && - (0 != strcasecmp ("now", - args[0])) ) || - (GNUNET_OK != + (NULL == args[6]) ) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "You must use YEAR, HISTORY-FEE, ACCOUNT-FEE, PURSE-FEE, PURSE-TIMEOUT, HISTORY-EXPIRATION and PURSE-ACCOUNT-LIMIT as arguments for this subcommand\n"); + test_shutdown (); + global_ret = EXIT_INVALIDARGUMENT; + return; + } + if ( (1 != sscanf (args[0], + "%u%c", + &year, + &dummy)) && + (0 != strcasecmp ("now", + args[0])) ) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Invalid YEAR given for 'global-fee' subcommand\n"); + test_shutdown (); + global_ret = EXIT_INVALIDARGUMENT; + return; + } + if ( (GNUNET_OK != TALER_string_to_amount (args[1], &fees.history)) || (GNUNET_OK != @@ -3412,20 +3426,34 @@ do_set_global_fee (char *const *args) &fees.account)) || (GNUNET_OK != TALER_string_to_amount (args[3], - &fees.purse)) || - (GNUNET_OK != + &fees.purse)) ) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Invalid amount given for 'global-fee' subcommand\n"); + test_shutdown (); + global_ret = EXIT_INVALIDARGUMENT; + return; + } + if ( (GNUNET_OK != GNUNET_STRINGS_fancy_time_to_relative (args[4], &purse_timeout)) || (GNUNET_OK != GNUNET_STRINGS_fancy_time_to_relative (args[5], - &history_expiration)) || - (1 != sscanf (args[6], - "%u%c", - &purse_account_limit, - &dummy)) ) + &history_expiration)) ) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "You must use YEAR, HISTORY-FEE, ACCOUNT-FEE, PURSE-FEE, PURSE-TIMEOUT, HISTORY-EXPIRATION and PURSE-ACCOUNT-LIMIT as arguments for this subcommand\n"); + "Invalid delay given for 'global-fee' subcommand\n"); + test_shutdown (); + global_ret = EXIT_INVALIDARGUMENT; + return; + } + if (1 != sscanf (args[6], + "%u%c", + &purse_account_limit, + &dummy)) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Invalid purse account limit given for 'global-fee' subcommand\n"); test_shutdown (); global_ret = EXIT_INVALIDARGUMENT; return; |