[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: -make LP delay configurable
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: -make LP delay configurable |
Date: |
Fri, 13 Jan 2023 10:51:48 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new caaa90d3 -make LP delay configurable
caaa90d3 is described below
commit caaa90d3d8b9f14998c856ab1b023c171a479b7a
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Jan 13 10:51:45 2023 +0100
-make LP delay configurable
---
src/exchange/taler-exchange-wirewatch.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/exchange/taler-exchange-wirewatch.c
b/src/exchange/taler-exchange-wirewatch.c
index 5ac51829..cad6b7d0 100644
--- a/src/exchange/taler-exchange-wirewatch.c
+++ b/src/exchange/taler-exchange-wirewatch.c
@@ -105,6 +105,12 @@ static struct GNUNET_TIME_Absolute shard_end_time;
*/
static struct GNUNET_TIME_Relative shard_delay;
+/**
+ * How long did we take to finish the last shard
+ * for this account?
+ */
+static struct GNUNET_TIME_Relative longpoll_timeout;
+
/**
* Name of our job in the shard table.
*/
@@ -474,7 +480,7 @@ transaction_completed (void)
struct GNUNET_TIME_Relative left;
latency = GNUNET_TIME_absolute_get_duration (hh_start_time);
- left = GNUNET_TIME_relative_subtract (LONGPOLL_TIMEOUT,
+ left = GNUNET_TIME_relative_subtract (longpoll_timeout,
latency);
delayed_until = GNUNET_TIME_relative_to_absolute (left);
}
@@ -1157,7 +1163,7 @@ continue_with_shard (void *cls)
limit,
test_mode
? GNUNET_TIME_UNIT_ZERO
- : LONGPOLL_TIMEOUT,
+ : longpoll_timeout,
&history_cb,
NULL);
if (NULL == hh)
@@ -1365,6 +1371,11 @@ main (int argc,
"exit-on-error",
"terminate wirewatch if we failed to download
information from the bank",
&exit_on_error),
+ GNUNET_GETOPT_option_relative_time ('f',
+ "longpoll-timeout",
+ "DELAY"
+ "what is the timeout when asking the
bank about new transactions",
+ &longpoll_timeout),
GNUNET_GETOPT_option_flag ('I',
"ignore-not-found",
"continue, even if the bank account of the
exchange was not found",
@@ -1390,6 +1401,7 @@ main (int argc,
};
enum GNUNET_GenericReturnValue ret;
+ longpoll_timeout = LONGPOLL_TIMEOUT;
if (GNUNET_OK !=
GNUNET_STRINGS_get_utf8_args (argc, argv,
&argc, &argv))
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-exchange] branch master updated: -make LP delay configurable,
gnunet <=