aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-09-29 15:49:00 +0200
committerChristian Grothoff <christian@grothoff.org>2024-09-29 15:49:00 +0200
commitc67c2b1dc6b31708cafcb6c452c36c3a1a852479 (patch)
tree706144aede082ce627d7439afb84b6810cb89003
parent587382674490778f398c05e970f95cbc2c58f2c3 (diff)
keep checking for updates to our KYC status once per week even without incidents (see #9218), just to ensure we learn about positive changes eventually
-rw-r--r--src/backend/taler-merchant-kyccheck.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/backend/taler-merchant-kyccheck.c b/src/backend/taler-merchant-kyccheck.c
index 73307052..594683cb 100644
--- a/src/backend/taler-merchant-kyccheck.c
+++ b/src/backend/taler-merchant-kyccheck.c
@@ -47,6 +47,15 @@
6)
/**
+ * How frequently do we check for updates to our KYC status
+ * if there is no actual reason to check? Set to a very low
+ * frequency, just to ensure we eventually notice.
+ */
+#define AML_LOW_FREQ GNUNET_TIME_relative_multiply ( \
+ GNUNET_TIME_UNIT_DAYS, \
+ 7)
+
+/**
* How many inquiries do we process concurrently at most.
*/
#define OPEN_INQUIRY_LIMIT 1024
@@ -495,7 +504,7 @@ exchange_check_cb (
else
{
/* KYC is OK, only check again if triggered */
- i->due = GNUNET_TIME_UNIT_FOREVER_ABS;
+ i->due = GNUNET_TIME_relative_to_absolute (AML_LOW_FREQ);
}
break;
case MHD_HTTP_ACCEPTED:
@@ -521,7 +530,7 @@ exchange_check_cb (
json_decref (i->jlimits);
i->jlimits = NULL;
/* KYC is OK, only check again if triggered */
- i->due = GNUNET_TIME_UNIT_FOREVER_ABS;
+ i->due = GNUNET_TIME_relative_to_absolute (AML_LOW_FREQ);
break;
case MHD_HTTP_FORBIDDEN: /* bad signature */
i->last_kyc_check = GNUNET_TIME_timestamp_get ();
@@ -775,7 +784,7 @@ start_inquiry (struct Exchange *e,
break;
case MHD_HTTP_NO_CONTENT:
/* KYC is OFF, only check again if triggered */
- i->due = GNUNET_TIME_UNIT_FOREVER_ABS;
+ i->due = GNUNET_TIME_relative_to_absolute (AML_LOW_FREQ);
break;
case MHD_HTTP_FORBIDDEN: /* bad signature */
case MHD_HTTP_NOT_FOUND: /* account unknown */