-minor fixes

This commit is contained in:
Christian Grothoff 2023-05-21 14:50:50 +02:00
parent bac7123763
commit 144b3a50a9
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
4 changed files with 48 additions and 34 deletions

View File

@ -12,6 +12,7 @@ CURRENCY_ROUND_UNIT = EUR:0.01
[exchange] [exchange]
AML_THRESHOLD = EUR:99999999
SIGNKEY_LEGAL_DURATION = 2 years SIGNKEY_LEGAL_DURATION = 2 years
# HTTP port the exchange listens to # HTTP port the exchange listens to
@ -50,6 +51,7 @@ HTTP_PORT = 8082
SERVE = http SERVE = http
MAX_DEBT = EUR:100000000000.0 MAX_DEBT = EUR:100000000000.0
MAX_DEBT_BANK = EUR:1000000000000000.0 MAX_DEBT_BANK = EUR:1000000000000000.0
DATABASE = bank-db.sqlite3
[benchmark] [benchmark]
USER_PAYTO_URI = payto://x-taler-bank/localhost:8082/42 USER_PAYTO_URI = payto://x-taler-bank/localhost:8082/42

View File

@ -12,6 +12,7 @@ CURRENCY_ROUND_UNIT = EUR:0.01
[exchange] [exchange]
AML_THRESHOLD = EUR:99999999
SIGNKEY_LEGAL_DURATION = 2 years SIGNKEY_LEGAL_DURATION = 2 years
# HTTP port the exchange listens to # HTTP port the exchange listens to
@ -50,6 +51,7 @@ HTTP_PORT = 8082
SERVE = http SERVE = http
MAX_DEBT = EUR:100000000000.0 MAX_DEBT = EUR:100000000000.0
MAX_DEBT_BANK = EUR:1000000000000000.0 MAX_DEBT_BANK = EUR:1000000000000000.0
DATABASE = bank-db.sqlite3
[benchmark] [benchmark]
USER_PAYTO_URI = payto://x-taler-bank/localhost:8082/42 USER_PAYTO_URI = payto://x-taler-bank/localhost:8082/42

View File

@ -1061,24 +1061,6 @@ main (int argc,
} }
if ( (MODE_EXCHANGE == mode) || (MODE_BOTH == mode) ) 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 /* If we use the fakebank, we MUST reset the database as the fakebank
will have forgotten everything... */ will have forgotten everything... */
GNUNET_assert (GNUNET_OK == GNUNET_assert (GNUNET_OK ==

View File

@ -3397,14 +3397,28 @@ do_set_global_fee (char *const *args)
(NULL == args[3]) || (NULL == args[3]) ||
(NULL == args[4]) || (NULL == args[4]) ||
(NULL == args[5]) || (NULL == args[5]) ||
(NULL == args[6]) || (NULL == args[6]) )
( (1 != sscanf (args[0], {
"%u%c", GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
&year, "You must use YEAR, HISTORY-FEE, ACCOUNT-FEE, PURSE-FEE, PURSE-TIMEOUT, HISTORY-EXPIRATION and PURSE-ACCOUNT-LIMIT as arguments for this subcommand\n");
&dummy)) && test_shutdown ();
(0 != strcasecmp ("now", global_ret = EXIT_INVALIDARGUMENT;
args[0])) ) || return;
(GNUNET_OK != }
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], TALER_string_to_amount (args[1],
&fees.history)) || &fees.history)) ||
(GNUNET_OK != (GNUNET_OK !=
@ -3412,20 +3426,34 @@ do_set_global_fee (char *const *args)
&fees.account)) || &fees.account)) ||
(GNUNET_OK != (GNUNET_OK !=
TALER_string_to_amount (args[3], TALER_string_to_amount (args[3],
&fees.purse)) || &fees.purse)) )
(GNUNET_OK != {
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], GNUNET_STRINGS_fancy_time_to_relative (args[4],
&purse_timeout)) || &purse_timeout)) ||
(GNUNET_OK != (GNUNET_OK !=
GNUNET_STRINGS_fancy_time_to_relative (args[5], GNUNET_STRINGS_fancy_time_to_relative (args[5],
&history_expiration)) || &history_expiration)) )
(1 != sscanf (args[6],
"%u%c",
&purse_account_limit,
&dummy)) )
{ {
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 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 (); test_shutdown ();
global_ret = EXIT_INVALIDARGUMENT; global_ret = EXIT_INVALIDARGUMENT;
return; return;