aboutsummaryrefslogtreecommitdiff
path: root/src/lib/exchange_api_deposit.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-01-13 17:47:15 +0100
committerChristian Grothoff <christian@grothoff.org>2019-01-13 17:47:15 +0100
commit7cc7660cac6b6a7552d977a4a00754f2f103c6e9 (patch)
tree8bdf257475a84ab169034e3521308ce1976a0638 /src/lib/exchange_api_deposit.c
parent91566ddee24dc0685cf33519583d55c813b26974 (diff)
finixh #5447 implementation (more testing needed)
Diffstat (limited to 'src/lib/exchange_api_deposit.c')
-rw-r--r--src/lib/exchange_api_deposit.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/exchange_api_deposit.c b/src/lib/exchange_api_deposit.c
index 9ff9d97d3..3f72ad956 100644
--- a/src/lib/exchange_api_deposit.c
+++ b/src/lib/exchange_api_deposit.c
@@ -35,6 +35,15 @@
/**
+ * 1:#AUDITOR_CHANCE is the probability that we report deposits
+ * to the auditor.
+ *
+ * 2==50% of going to auditor. This is way too high, but set
+ * deliberately this high for testing
+ */
+#define AUDITOR_CHANCE 2
+
+/**
* @brief A Deposit Handle
*/
struct TALER_EXCHANGE_DepositHandle
@@ -118,7 +127,8 @@ auditor_cb (void *cls,
struct TALER_Amount amount_without_fee;
struct TEAH_AuditorInteractionEntry *aie;
- if (1 /* #5447: replace with "for all auditors, if auditor selected for DC notification... */)
+ if (0 != GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
+ AUDITOR_CHANCE))
return NULL;
key_state = TALER_EXCHANGE_get_keys (dh->exchange);
spk = TALER_EXCHANGE_get_signing_key_details (key_state,