[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-exchange] 02/03: Benchmark.
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-exchange] 02/03: Benchmark. |
Date: |
Wed, 25 Jul 2018 10:26:06 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository exchange.
commit 64cb473ff4b56578068499f4499f73693b7b961f
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Jul 25 09:31:18 2018 +0200
Benchmark.
Calculating total amount for the (unique) reserve.
---
src/benchmark/taler-exchange-benchmark-new.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/src/benchmark/taler-exchange-benchmark-new.c
b/src/benchmark/taler-exchange-benchmark-new.c
index 641a9da..edc3c1d 100644
--- a/src/benchmark/taler-exchange-benchmark-new.c
+++ b/src/benchmark/taler-exchange-benchmark-new.c
@@ -239,6 +239,9 @@ static void
run (void *cls,
struct TALER_TESTING_Interpreter *is)
{
+ struct TALER_Amount total_reserve_amount;
+ struct TALER_Amount withdraw_fee;
+ char *withdraw_fee_str;
#define APIKEY_SANDBOX "Authorization: ApiKey sandbox"
@@ -262,6 +265,23 @@ run (void *cls,
order_worth_5_unaggregated,
order_worth_10_2coins);
+ strcpy (total_reserve_amount.currency,
+ currency);
+ total_reserve_amount.value = 5 * howmany_coins;
+ GNUNET_asprintf (&withdraw_fee_str,
+ "%s:0.1",
+ currency);
+ TALER_string_to_amount (withdraw_fee_str,
+ &withdraw_fee);
+ for (unsigned int i = 0; i < howmany_coins; i++)
+ TALER_amount_add (&total_reserve_amount,
+ &total_reserve_amount,
+ &withdraw_fee);
+
+ /* 1st, calculate how much money should be held in
+ * reserve. Being all 5-valued coins, the overall
+ * value should be: 5 times `howmany_coins' */
+
struct TALER_TESTING_Command commands[] = {
CMD_TRANSFER_TO_EXCHANGE
--
To stop receiving notification emails like this one, please contact
address@hidden