aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-08-08 23:29:21 +0200
committerChristian Grothoff <christian@grothoff.org>2024-08-08 23:29:21 +0200
commit1815964368c4b4456f2f10555cf4b5a8a6f0fc47 (patch)
treed170c0b47c412527d20f8d916a29c2816c473e6e
parent3cc103db65144402122f0f0bcb64fc0b406929eb (diff)
add AGGREGATE to aml progs
-rw-r--r--src/kyclogic/kyclogic_api.c6
-rwxr-xr-xsrc/kyclogic/taler-exchange-helper-measure-freeze9
-rwxr-xr-xsrc/kyclogic/taler-exchange-helper-measure-test-form9
-rwxr-xr-xsrc/kyclogic/taler-exchange-helper-measure-test-oauth9
4 files changed, 31 insertions, 2 deletions
diff --git a/src/kyclogic/kyclogic_api.c b/src/kyclogic/kyclogic_api.c
index 598cd50e9..43604a206 100644
--- a/src/kyclogic/kyclogic_api.c
+++ b/src/kyclogic/kyclogic_api.c
@@ -2703,8 +2703,10 @@ check_amount (
if (ktc->event != rule->trigger)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Wrong event type for rule %u\n",
- i);
+ "Wrong event type (%d) for rule %u (%d)\n",
+ (int) ktc->event,
+ i,
+ (int) rule->trigger);
continue; /* wrong trigger event type */
}
if (GNUNET_TIME_relative_cmp (dur,
diff --git a/src/kyclogic/taler-exchange-helper-measure-freeze b/src/kyclogic/taler-exchange-helper-measure-freeze
index 02f8b423d..5b2fc554f 100755
--- a/src/kyclogic/taler-exchange-helper-measure-freeze
+++ b/src/kyclogic/taler-exchange-helper-measure-freeze
@@ -72,6 +72,15 @@ jq -n \
"is_and_combinator" : true
},
{
+ "operation_type": "AGGREGATE",
+ "threshold" : "EUR:0",
+ "timeframe" : { "d_us" : 3600000000 },
+ "measures" : [ "verboten" ],
+ "display_priority" : 1,
+ "exposed" : false,
+ "is_and_combinator" : true
+ },
+ {
"operation_type": "MERGE",
"threshold" : "EUR:0",
"timeframe" : { "d_us" : 3600000000 },
diff --git a/src/kyclogic/taler-exchange-helper-measure-test-form b/src/kyclogic/taler-exchange-helper-measure-test-form
index d231e6244..c5895a833 100755
--- a/src/kyclogic/taler-exchange-helper-measure-test-form
+++ b/src/kyclogic/taler-exchange-helper-measure-test-form
@@ -89,6 +89,15 @@ jq -n \
"is_and_combinator" : true
},
{
+ "operation_type": "AGGREGATE",
+ "threshold" : "EUR:1000",
+ "timeframe" : { "d_us" : 3600000000 },
+ "measures" : [ "verboten" ],
+ "display_priority" : 1,
+ "exposed" : true,
+ "is_and_combinator" : true
+ },
+ {
"operation_type": "MERGE",
"threshold" : "EUR:1000",
"timeframe" : { "d_us" : 3600000000 },
diff --git a/src/kyclogic/taler-exchange-helper-measure-test-oauth b/src/kyclogic/taler-exchange-helper-measure-test-oauth
index 554a179b6..959ac1b8d 100755
--- a/src/kyclogic/taler-exchange-helper-measure-test-oauth
+++ b/src/kyclogic/taler-exchange-helper-measure-test-oauth
@@ -89,6 +89,15 @@ jq -n \
"is_and_combinator" : true
},
{
+ "operation_type": "AGGREGATE",
+ "threshold" : "EUR:1000",
+ "timeframe" : { "d_us" : 3600000000 },
+ "measures" : [ "verboten" ],
+ "display_priority" : 1,
+ "exposed" : true,
+ "is_and_combinator" : true
+ },
+ {
"operation_type": "MERGE",
"threshold" : "EUR:1000",
"timeframe" : { "d_us" : 3600000000 },