commit ce5977cc81df440fcd5d19094f825970b0131a56
parent aee40a64055db091e1478d66110cd620e8f3c91f
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 11 Oct 2026 15:08:03 +0200
check latest decision, not oldest
Diffstat:
1 file changed, 27 insertions(+), 15 deletions(-)
diff --git a/src/testing/testing_api_cmd_check_aml_decisions.c b/src/testing/testing_api_cmd_check_aml_decisions.c
@@ -97,7 +97,7 @@ check_aml_decisions_cb (
{
const struct TALER_TESTING_Command *ref;
const char *justification;
- const struct TALER_EXCHANGE_GetAmlDecisionsDecision *oldest = NULL;
+ const struct TALER_EXCHANGE_GetAmlDecisionsDecision *latest = NULL;
if (NULL != ds->ref_operation)
{
@@ -120,19 +120,19 @@ check_aml_decisions_cb (
const struct TALER_EXCHANGE_GetAmlDecisionsDecision *aml_history
= &adr->details.ok.records[i];
- if ( (NULL == oldest) ||
- (GNUNET_TIME_timestamp_cmp (oldest->decision_time,
- >,
+ if ( (NULL == latest) ||
+ (GNUNET_TIME_timestamp_cmp (latest->decision_time,
+ <,
aml_history->decision_time)) )
- oldest = aml_history;
+ latest = aml_history;
}
- if (NULL == oldest)
+ if (NULL == latest)
{
GNUNET_break (0);
TALER_TESTING_interpreter_fail (ds->is);
return;
}
- if (0 != strcmp (oldest->justification,
+ if (0 != strcmp (latest->justification,
justification) )
{
GNUNET_break (0);
@@ -225,14 +225,26 @@ check_aml_decisions_run (
TALER_TESTING_interpreter_fail (is);
return;
}
- TALER_EXCHANGE_get_aml_decisions_set_options (
- ds->dh,
- TALER_EXCHANGE_get_aml_decisions_option_offset (UINT64_MAX),
- TALER_EXCHANGE_get_aml_decisions_option_limit (-1));
- if (NULL != h_payto)
- TALER_EXCHANGE_get_aml_decisions_set_options (
- ds->dh,
- TALER_EXCHANGE_get_aml_decisions_option_filter_h_payto (h_payto));
+ if (GNUNET_OK !=
+ TALER_EXCHANGE_get_aml_decisions_set_options (
+ ds->dh,
+ TALER_EXCHANGE_get_aml_decisions_option_offset (INT64_MAX),
+ TALER_EXCHANGE_get_aml_decisions_option_limit (-1)))
+ {
+ GNUNET_break (0);
+ TALER_TESTING_interpreter_fail (is);
+ return;
+ }
+ if ( (NULL != h_payto) &&
+ (GNUNET_OK !=
+ TALER_EXCHANGE_get_aml_decisions_set_options (
+ ds->dh,
+ TALER_EXCHANGE_get_aml_decisions_option_filter_h_payto (h_payto))) )
+ {
+ GNUNET_break (0);
+ TALER_TESTING_interpreter_fail (is);
+ return;
+ }
{
enum TALER_ErrorCode ec;