aboutsummaryrefslogtreecommitdiff
path: root/src/merchant-tools/taler-merchant-benchmark.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-11-03 23:14:36 +0100
committerChristian Grothoff <christian@grothoff.org>2020-11-03 23:14:36 +0100
commit2aaf31ac2b6e4b82128290711552caffe21328bd (patch)
tree4fee38e775f9515f030fd67cd23fdbb599c2ef1f /src/merchant-tools/taler-merchant-benchmark.c
parentda1f0d511cd532d0d58a1661f8b28d4185b3b284 (diff)
make benchmark currency-neutral
Diffstat (limited to 'src/merchant-tools/taler-merchant-benchmark.c')
-rw-r--r--src/merchant-tools/taler-merchant-benchmark.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/merchant-tools/taler-merchant-benchmark.c b/src/merchant-tools/taler-merchant-benchmark.c
index b6992678..47cb106d 100644
--- a/src/merchant-tools/taler-merchant-benchmark.c
+++ b/src/merchant-tools/taler-merchant-benchmark.c
@@ -146,6 +146,7 @@ run (void *cls,
char CURRENCY_5_01[MAX_AMOUNT_LEN];
char CURRENCY_5[MAX_AMOUNT_LEN];
char CURRENCY_4_99[MAX_AMOUNT_LEN];
+ char CURRENCY_4_98[MAX_AMOUNT_LEN];
char CURRENCY_0_02[MAX_AMOUNT_LEN];
char CURRENCY_0_01[MAX_AMOUNT_LEN];
@@ -173,6 +174,10 @@ run (void *cls,
sizeof (CURRENCY_4_99),
"%s:4.99",
currency);
+ GNUNET_snprintf (CURRENCY_4_98,
+ sizeof (CURRENCY_4_98),
+ "%s:4.98",
+ currency);
GNUNET_snprintf (CURRENCY_0_02,
sizeof (CURRENCY_0_02),
"%s:0.02",
@@ -203,7 +208,7 @@ run (void *cls,
merchant_url,
"default",
PAYTO_I1,
- "EUR",
+ currency,
MHD_HTTP_NO_CONTENT),
TALER_TESTING_cmd_admin_add_incoming ("create-reserve-1",
CURRENCY_10_02,
@@ -225,7 +230,7 @@ run (void *cls,
NULL, /* random order ID please */
GNUNET_TIME_UNIT_ZERO_ABS,
GNUNET_TIME_UNIT_FOREVER_ABS,
- "EUR:5.0"),
+ CURRENCY_5),
TALER_TESTING_cmd_merchant_pay_order ("deposit-simple",
merchant_url,
MHD_HTTP_OK,
@@ -246,7 +251,7 @@ run (void *cls,
NULL, /* random order ID */
GNUNET_TIME_UNIT_ZERO_ABS,
GNUNET_TIME_UNIT_FOREVER_ABS,
- "EUR:5.0"),
+ CURRENCY_5),
TALER_TESTING_cmd_merchant_pay_order ("deposit-simple-2",
merchant_url,
MHD_HTTP_OK,
@@ -266,7 +271,7 @@ run (void *cls,
&bc.exchange_auth,
bc.exchange_auth.wire_gateway_url,
merchant_url,
- "EUR:4.98",
+ CURRENCY_4_98,
MHD_HTTP_OK,
"deposit-simple-2",
NULL),
@@ -294,13 +299,13 @@ run (void *cls,
merchant_url,
"default",
PAYTO_I1,
- "EUR",
+ currency,
MHD_HTTP_NO_CONTENT),
TALER_TESTING_cmd_merchant_post_instances ("instance-create-alt",
merchant_url,
alt_instance_id,
PAYTO_I1,
- "EUR",
+ currency,
MHD_HTTP_NO_CONTENT),
TALER_TESTING_cmd_admin_add_incoming ("create-reserve-1",
CURRENCY_5_01,
@@ -318,7 +323,7 @@ run (void *cls,
NULL, /* use random order ID */
GNUNET_TIME_UNIT_ZERO_ABS,
GNUNET_TIME_UNIT_FOREVER_ABS,
- "EUR:5.0"),
+ CURRENCY_5),
TALER_TESTING_cmd_merchant_pay_order ("deposit-unaggregated",
alt_instance_url,
MHD_HTTP_OK,
@@ -350,7 +355,7 @@ run (void *cls,
NULL, /* use random order ID */
GNUNET_TIME_UNIT_ZERO_ABS,
GNUNET_TIME_UNIT_FOREVER_ABS,
- "EUR:10.0"),
+ CURRENCY_10),
TALER_TESTING_cmd_merchant_pay_order ("deposit-twocoins",
merchant_url,
MHD_HTTP_OK,