[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: integrate creation of alt instan
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: integrate creation of alt instance with merchant benchmark main logic |
Date: |
Sat, 31 Oct 2020 09:03:35 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new f4be553 integrate creation of alt instance with merchant benchmark
main logic
f4be553 is described below
commit f4be55340485c862c932675d2aeae083db8ed1c0
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sat Oct 31 09:03:30 2020 +0100
integrate creation of alt instance with merchant benchmark main logic
---
src/merchant-tools/taler-merchant-benchmark.c | 39 +++++++++++++--------------
1 file changed, 18 insertions(+), 21 deletions(-)
diff --git a/src/merchant-tools/taler-merchant-benchmark.c
b/src/merchant-tools/taler-merchant-benchmark.c
index 86c2d2b..90aa972 100644
--- a/src/merchant-tools/taler-merchant-benchmark.c
+++ b/src/merchant-tools/taler-merchant-benchmark.c
@@ -67,6 +67,11 @@ enum PaymentGeneratorError
};
+/**
+ * ID to use for the 'alternative' instance.
+ */
+static const char *alt_instance_id = "alt";
+
/**
* What API key should we send in the HTTP 'Authorization' header?
*/
@@ -296,6 +301,12 @@ run (void *cls,
PAYTO_I1,
"EUR",
MHD_HTTP_NO_CONTENT),
+ TALER_TESTING_cmd_merchant_post_instances ("instance-create-alt",
+ merchant_url,
+ alt_instance_id,
+ PAYTO_I1,
+ "EUR",
+ MHD_HTTP_NO_CONTENT),
TALER_TESTING_cmd_admin_add_incoming ("create-reserve-1",
CURRENCY_5_01,
&bc.exchange_auth,
@@ -399,7 +410,6 @@ main (int argc,
char *loglev = NULL;
char *logfile = NULL;
char *exchange_account = NULL;
- char *alt_instance_id = NULL;
struct GNUNET_OS_Process *bankd;
struct GNUNET_OS_Process *merchantd;
struct GNUNET_GETOPT_CommandLineOption *options;
@@ -423,6 +433,7 @@ main (int argc,
"will log to file LF",
&logfile),
GNUNET_GETOPT_option_loglevel (&loglev),
+ GNUNET_GETOPT_option_cfgfile (&cfg_filename),
GNUNET_GETOPT_option_help ("Populate databases with corner case payments"),
GNUNET_GETOPT_option_uint ('u',
"unaggregated-number",
@@ -449,19 +460,6 @@ main (int argc,
"APIKEY",
"HTTP 'Authorization' header to send to the
merchant",
&apikey),
- GNUNET_GETOPT_option_mandatory (
- GNUNET_GETOPT_option_string ('i',
- "alt-instance",
- "AI",
- "alternative (non default) instance,"
- " used to provide fresh wire details to"
- " make unaggregated transactions stay so."
- " Note, this instance will be given far"
- " future wire deadline, and so it should"
- " never author now-deadlined transactions,"
- " as they would get those far future ones"
- " aggregated too.",
- &alt_instance_id)),
GNUNET_GETOPT_OPTION_END
};
struct GNUNET_GETOPT_CommandLineOption ordinary_options[] = {
@@ -570,13 +568,12 @@ main (int argc,
TALER_LOG_ERROR ("Failed to prepare for the merchant\n");
return PG_FAILED_TO_PREPARE_MERCHANT;
}
- if (NULL != alt_instance_id)
- {
- GNUNET_assert (0 < GNUNET_asprintf (&alt_instance_url,
- "%s/instances/%s/",
- merchant_url,
- alt_instance_id));
- }
+ GNUNET_assert (0 < strlen (merchant_url));
+ GNUNET_assert (merchant_url[strlen(merchant_url)-1] == '/');
+ GNUNET_assert (0 < GNUNET_asprintf (&alt_instance_url,
+ "%sinstances/%s/",
+ merchant_url,
+ alt_instance_id));
if (GNUNET_OK !=
TALER_TESTING_prepare_bank (cfg_filename,
GNUNET_NO,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: integrate creation of alt instance with merchant benchmark main logic,
gnunet <=