commit 91a67046e49d8eed200cda77f238f5b31641a8b8
parent 9d280c23b2baf475ca3ce1ec03ab5ee534c1df04
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Tue, 25 Mar 2025 12:29:42 +0100
first draft of TOPS AML TmeR rules, and new taler-exchange-dbinit -d/-e CLI options to enable customization SCHEMA
Diffstat:
10 files changed, 906 insertions(+), 344 deletions(-)
diff --git a/src/exchange-tools/taler-exchange-dbinit.c b/src/exchange-tools/taler-exchange-dbinit.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2014-2024 Taler Systems SA
+ Copyright (C) 2014-2025 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
@@ -40,6 +40,16 @@ static int inject_auditor;
static int reset_db;
/**
+ * -e option: enable custom rules
+ */
+static char *enable_rules;
+
+/**
+ * -d option: disable custom rules
+ */
+static char *disable_rules;
+
+/**
* -s option: clear revolving shard locks
*/
static int clear_shards;
@@ -149,6 +159,67 @@ run (void *cls,
global_ret = EXIT_FAILURE;
}
}
+ if (NULL != disable_rules)
+ {
+ if (0 == strcasecmp (disable_rules,
+ "exchange"))
+ {
+ fprintf (stderr,
+ "'exchange' is not a customization rule set!\n");
+ global_ret = EXIT_INVALIDARGUMENT;
+ return;
+ }
+ if (GNUNET_OK !=
+ plugin->preflight (plugin->cls))
+ {
+ fprintf (stderr,
+ "Preflight check failed!\n");
+ global_ret = EXIT_FAILURE;
+ return;
+ }
+ switch (plugin->disable_rules (plugin->cls,
+ disable_rules))
+ {
+ case GNUNET_DB_STATUS_HARD_ERROR:
+ fprintf (stderr,
+ "Hard DB error trying to disable customization!\n");
+ global_ret = EXIT_FAILURE;
+ return;
+ case GNUNET_DB_STATUS_SOFT_ERROR:
+ /* single call, should not be possible */
+ GNUNET_break (0);
+ global_ret = EXIT_FAILURE;
+ return;
+ case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Did not find customization schema `%s'\n",
+ disable_rules);
+ break;
+ case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT:
+ break;
+ }
+ }
+ if (NULL != enable_rules)
+ {
+ if (0 == strcasecmp (enable_rules,
+ "exchange"))
+ {
+ fprintf (stderr,
+ "'exchange' is not a customization rule set!\n");
+ global_ret = EXIT_INVALIDARGUMENT;
+ return;
+ }
+ if (GNUNET_OK !=
+ plugin->enable_rules (plugin->cls,
+ enable_rules))
+ {
+ fprintf (stderr,
+ "Enabling customization `%s' failed!\n",
+ enable_rules);
+ global_ret = EXIT_FAILURE;
+ return;
+ }
+ }
TALER_EXCHANGEDB_plugin_unload (plugin);
plugin = NULL;
}
@@ -171,6 +242,16 @@ main (int argc,
"inject-auditor",
"inject auditor triggers",
&inject_auditor),
+ GNUNET_GETOPT_option_string ('d',
+ "disable-customization",
+ "SCHEMA",
+ "remove customization rules of SCHEMA",
+ &disable_rules),
+ GNUNET_GETOPT_option_string ('e',
+ "enable-customization",
+ "SCHEMA",
+ "enable or update (to latest version) the customization rules of SCHEMA",
+ &enable_rules),
GNUNET_GETOPT_option_flag ('g',
"gc",
"garbage collect database",
diff --git a/src/exchangedb/Makefile.am b/src/exchangedb/Makefile.am
@@ -37,7 +37,6 @@ sqlinputs = \
exchange-0006.sql.in \
exchange-0007.sql.in \
exchange-0008.sql.in \
- exchange-0009.sql \
exchange_statistics_*.sql
sql_DATA = \
@@ -54,7 +53,8 @@ sql_DATA = \
exchange-0008.sql \
exchange-0009.sql \
drop.sql \
- procedures.sql
+ procedures.sql \
+ tops-0001.sql
BUILT_SOURCES = \
benchmark-0001.sql \
@@ -151,6 +151,7 @@ libtaler_plugin_exchangedb_postgres_la_SOURCES = \
pg_create_tables.h pg_create_tables.c \
pg_delete_aggregation_transient.h pg_delete_aggregation_transient.c \
pg_delete_shard_locks.h pg_delete_shard_locks.c \
+ pg_disable_rules.h pg_disable_rules.c \
pg_do_age_withdraw.h pg_do_age_withdraw.c \
pg_do_batch_withdraw.h pg_do_batch_withdraw.c \
pg_do_batch_withdraw_insert.h pg_do_batch_withdraw_insert.c \
@@ -167,6 +168,7 @@ libtaler_plugin_exchangedb_postgres_la_SOURCES = \
pg_do_reserve_purse.h pg_do_reserve_purse.c \
pg_drain_kyc_alert.h pg_drain_kyc_alert.c \
pg_drop_tables.h pg_drop_tables.c \
+ pg_enable_rules.h pg_enable_rules.c \
pg_ensure_coin_known.h pg_ensure_coin_known.c \
pg_event_listen.h pg_event_listen.c \
pg_event_listen_cancel.h pg_event_listen_cancel.c \
diff --git a/src/exchangedb/exchange_statistics_helpers.sql b/src/exchangedb/exchange_statistics_helpers.sql
@@ -567,7 +567,7 @@ COMMENT ON FUNCTION exchange_statistic_interval_number_get
DROP FUNCTION IF EXISTS exchange_statistic_interval_amount_get;
CREATE OR REPLACE FUNCTION exchange_statistic_interval_amount_get (
IN in_slug TEXT,
- IN in_instance_id TEXT
+ IN in_h_payto BYTEA
)
RETURNS SETOF exchange_statistic_interval_amount_get_return_value
LANGUAGE plpgsql
@@ -1007,3 +1007,38 @@ COMMENT ON PROCEDURE exchange_statistic_bucket_gc
IS 'Performs garbage collection of the exchange_statistic_bucket_counter and exchange_statistic_bucket_amount tables';
+
+DROP FUNCTIOn IF EXISTS exchange_drop_customization;
+CREATE OR REPLACE FUNCTION exchange_drop_customization (
+ IN in_schema TEXT,
+ OUT out_found BOOLEAN
+)
+LANGUAGE plpgsql
+AS $$
+BEGIN
+ -- Update DB versioning table.
+ WITH xpatches AS (
+ SELECT patch_name
+ FROM _v.patches
+ WHERE starts_with(patch_name, in_schema || '-')
+ )
+ SELECT _v.unregister_patch(xpatches.patch_name)
+ FROM xpatches;
+ out_found = FOUND;
+
+ -- Drop the schema with all stored procedures/functions.
+ -- This also removes all associated triggers, hence CASCADE.
+ DROP SCHEMA in_schema CASCADE;
+
+ -- Finally, need to also remove entries from the statistics meta-tables.
+ -- Doing so also DELETEs the associated statistics, hence CASCADE.
+ DELETE
+ FROM exchange_statistic_interval_meta
+ WHERE origin=in_schema CASCADE;
+ DELETE
+ FROM exchange_statistic_bucket_meta
+ WHERE origin=in_schema CASCADE;
+END $$;
+COMMENT ON FUNCTION exchange_drop_customization
+ IS 'Removes all entries related to a particular exchange customization schema';
+
diff --git a/src/exchangedb/pg_disable_rules.c b/src/exchangedb/pg_disable_rules.c
@@ -0,0 +1,62 @@
+/*
+ This file is part of TALER
+ Copyright (C) 2025 Taler Systems SA
+
+ TALER is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+ */
+/**
+ * @file exchangedb/pg_disable_rules.c
+ * @brief Implementation of the disable_rules function for Postgres
+ * @author Christian Grothoff
+ */
+#include "platform.h"
+#include "taler_error_codes.h"
+#include "taler_dbevents.h"
+#include "taler_pq_lib.h"
+#include "pg_disable_rules.h"
+#include "pg_helper.h"
+
+
+enum GNUNET_DB_QueryStatus
+TEH_PG_disable_rules (
+ void *cls,
+ const char *schema)
+{
+ struct PostgresClosure *pg = cls;
+ struct GNUNET_PQ_QueryParam params[] = {
+ GNUNET_PQ_query_param_string (schema),
+ GNUNET_PQ_query_param_end
+ };
+ bool found;
+ struct GNUNET_PQ_ResultSpec rs[] = {
+ GNUNET_PQ_result_spec_bool ("found",
+ &found),
+ GNUNET_PQ_result_spec_end
+ };
+ enum GNUNET_DB_QueryStatus qs;
+
+ PREPARE (pg,
+ "call_exchange_drop_customization",
+ "SELECT "
+ " out_found AS found"
+ " FROM exchange_drop_customization"
+ " ($1);");
+ qs = GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
+ "call_exchange_drop_customization",
+ params,
+ rs);
+ if (qs < 0)
+ return qs;
+ if (found)
+ return GNUNET_DB_STATUS_SUCCESS_ONE_RESULT;
+ return GNUNET_DB_STATUS_SUCCESS_NO_RESULTS;
+}
diff --git a/src/exchangedb/pg_disable_rules.h b/src/exchangedb/pg_disable_rules.h
@@ -0,0 +1,41 @@
+/*
+ This file is part of TALER
+ Copyright (C) 2025 Taler Systems SA
+
+ TALER is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+ */
+/**
+ * @file exchangedb/pg_disable_rules.h
+ * @brief implementation of the disable_rules function for Postgres
+ * @author Christian Grothoff
+ */
+#ifndef PG_DISABLE_RULES_H
+#define PG_DISABLE_RULES_H
+
+#include "taler_util.h"
+#include "taler_json_lib.h"
+#include "taler_exchangedb_plugin.h"
+
+
+/**
+ * Disable (delete/drop) customization rule schema from a deployment.
+ *
+ * @param cls closure
+ * @param schema name of the schema with customization rules to remove
+ * @return transaction status
+ */
+enum GNUNET_DB_QueryStatus
+TEH_PG_disable_rules (
+ void *cls,
+ const char *schema);
+
+#endif
diff --git a/src/exchangedb/pg_enable_rules.c b/src/exchangedb/pg_enable_rules.c
@@ -0,0 +1,76 @@
+/*
+ This file is part of TALER
+ Copyright (C) 2025 Taler Systems SA
+
+ TALER is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+ */
+/**
+ * @file exchangedb/pg_enable_rules.c
+ * @brief Implementation of the enable_rules function for Postgres
+ * @author Christian Grothoff
+ */
+#include "platform.h"
+#include "taler_error_codes.h"
+#include "taler_dbevents.h"
+#include "taler_pq_lib.h"
+#include "pg_enable_rules.h"
+#include "pg_helper.h"
+
+
+enum GNUNET_GenericReturnValue
+TEH_PG_enable_rules (
+ void *cls,
+ const char *schema)
+{
+ struct PostgresClosure *pg = cls;
+ struct GNUNET_PQ_Context *conn;
+ enum GNUNET_GenericReturnValue ret;
+ char *sp;
+
+ GNUNET_asprintf (&sp,
+ "SET search_path TO %s,exchange;",
+ schema);
+ {
+ struct GNUNET_PQ_ExecuteStatement es[] = {
+ GNUNET_PQ_make_try_execute (sp),
+ GNUNET_PQ_EXECUTE_STATEMENT_END
+ };
+ char *schemadash;
+
+ GNUNET_asprintf (&schemadash,
+ "%s-",
+ schema);
+ conn = GNUNET_PQ_connect_with_cfg (pg->cfg,
+ "exchangedb-postgres",
+ schemadash,
+ es,
+ NULL);
+ GNUNET_free (schemadash);
+ }
+ GNUNET_free (sp);
+ if (NULL == conn)
+ return GNUNET_SYSERR;
+ {
+ char *procfile;
+
+ GNUNET_asprintf (&procfile,
+ "%s-procedures",
+ schema);
+ ret = GNUNET_PQ_exec_sql (conn,
+ procfile);
+ /* $SCHEMA-procedures MAY not exist, so only check for hard error */
+ GNUNET_break (GNUNET_SYSERR != ret);
+ GNUNET_free (procfile);
+ }
+ GNUNET_PQ_disconnect (conn);
+ return ret;
+}
diff --git a/src/exchangedb/pg_enable_rules.h b/src/exchangedb/pg_enable_rules.h
@@ -0,0 +1,41 @@
+/*
+ This file is part of TALER
+ Copyright (C) 2025 Taler Systems SA
+
+ TALER is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+ */
+/**
+ * @file exchangedb/pg_enable_rules.h
+ * @brief implementation of the enable_rules function for Postgres
+ * @author Christian Grothoff
+ */
+#ifndef PG_ENABLE_RULES_H
+#define PG_ENABLE_RULES_H
+
+#include "taler_util.h"
+#include "taler_json_lib.h"
+#include "taler_exchangedb_plugin.h"
+
+
+/**
+ * Enable (create/insert) customization rule schema from a deployment.
+ *
+ * @param cls closure
+ * @param schema name of the schema with customization rules to remove
+ * @return transaction status
+ */
+enum GNUNET_GenericReturnValue
+TEH_PG_enable_rules (
+ void *cls,
+ const char *schema);
+
+#endif
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -44,6 +44,7 @@
#include "pg_create_tables.h"
#include "pg_delete_aggregation_transient.h"
#include "pg_delete_shard_locks.h"
+#include "pg_disable_rules.h"
#include "pg_do_age_withdraw.h"
#include "pg_do_batch_withdraw.h"
#include "pg_do_batch_withdraw_insert.h"
@@ -60,6 +61,7 @@
#include "pg_do_reserve_purse.h"
#include "pg_drain_kyc_alert.h"
#include "pg_drop_tables.h"
+#include "pg_enable_rules.h"
#include "pg_ensure_coin_known.h"
#include "pg_event_listen.h"
#include "pg_event_listen_cancel.h"
@@ -256,14 +258,14 @@
* @param conn SQL connection that was used
*/
#define BREAK_DB_ERR(result,conn) do { \
- GNUNET_break (0); \
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, \
- "Database failure: %s/%s/%s/%s/%s", \
- PQresultErrorField (result, PG_DIAG_MESSAGE_PRIMARY), \
- PQresultErrorField (result, PG_DIAG_MESSAGE_DETAIL), \
- PQresultErrorMessage (result), \
- PQresStatus (PQresultStatus (result)), \
- PQerrorMessage (conn)); \
+ GNUNET_break (0); \
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR, \
+ "Database failure: %s/%s/%s/%s/%s", \
+ PQresultErrorField (result, PG_DIAG_MESSAGE_PRIMARY), \
+ PQresultErrorField (result, PG_DIAG_MESSAGE_DETAIL), \
+ PQresultErrorMessage (result), \
+ PQresStatus (PQresultStatus (result)), \
+ PQerrorMessage (conn)); \
} while (0)
@@ -760,6 +762,10 @@ libtaler_plugin_exchangedb_postgres_init (void *cls)
= &TEH_PG_select_kyc_attributes;
plugin->insert_aml_officer
= &TEH_PG_insert_aml_officer;
+ plugin->enable_rules
+ = &TEH_PG_enable_rules;
+ plugin->disable_rules
+ = &TEH_PG_disable_rules;
plugin->test_aml_officer
= &TEH_PG_test_aml_officer;
plugin->lookup_aml_officer
diff --git a/src/exchangedb/tops-0001.sql b/src/exchangedb/tops-0001.sql
@@ -0,0 +1,194 @@
+--
+-- This file is part of TALER
+-- Copyright (C) 2025 Taler Systems SA
+--
+-- TALER is free software; you can redistribute it and/or modify it under the
+-- terms of the GNU General Public License as published by the Free Software
+-- Foundation; either version 3, or (at your option) any later version.
+--
+-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+-- A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License along with
+-- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+--
+
+-- @file tops-0001.sql
+-- @brief special TOPS-specific (AML) rules to inject into an exchange
+-- @author Christian Grothoff
+
+-- Everything in one big transaction
+BEGIN;
+
+-- Check patch versioning is in place.
+SELECT _v.register_patch('tops-0001', NULL, NULL);
+
+-- Note: this NOT an accident: the schema MUST be named
+-- using the filename prefix (and the name under --enable-custom of taler-exchange-dbinit).
+CREATE SCHEMA IF NOT EXISTS tops;
+
+SET search_path TO tops,exchange;
+
+INSERT INTO exchange_statistic_interval_meta
+ (origin
+ ,slug
+ ,description
+ ,stype
+ ,ranges
+ ,precisions)
+VALUES
+-- this first one is just for testing right now
+ ('tops' -- must match schema!
+ ,'deposit-transactions'
+ ,'number of (batch) deposits performed by this merchant, used to detect sudden increase in number of transactions'
+ ,'number'
+ ,generate_series (60*60*24*7, 60*60*24*7*52, 60*60*24*7) -- weekly volume over the last year
+ ,array_fill (60*60*24, 52) -- precision is per day
+ ),
+ ('tops' -- must match schema!
+ ,'deposit-volume'
+ ,'total amount deposited by this merchant in (batch) deposits, used to detect sudden increase in transaction volume'
+ ,'amount'
+ ,generate_series (60*60*24*7, 60*60*24*7*52, 60*60*24*7) -- weekly volume over the last year
+ ,array_fill (60*60*24, 52) -- precision is per day
+ )
+ON CONFLICT DO NOTHING;
+
+DROP FUNCTION IF EXISTS exchange_deposit_statistics_trigger CASCADE;
+CREATE FUNCTION exchange_deposit_statistics_trigger()
+RETURNS trigger
+LANGUAGE plpgsql
+AS $$
+DECLARE
+ my_h_payto BYTEA; -- normalized h_payto of target account
+ my_rec RECORD;
+ my_last_year taler_amount;
+ my_last_month taler_amount;
+ my_old_rules RECORD;
+ my_properties TEXT;
+ my_measure_name TEXT;
+ my_rules TEXT;
+BEGIN
+ SELECT wt.h_normalized_payto
+ INTO my_h_payto
+ FROM wire_targets wt
+ WHERE wire_target_h_payto = NEW.wire_target_h_payto;
+-- FIXME: we're hard-coding an amount for testing; the
+-- final logic will be written once we have for Oec's
+-- unified deposit table patch, that'll make this WAY simpler
+-- as we should have the amount without having to iterate.
+ CALL exchange_do_bump_amount_stat
+ ('deposit-volume'
+ ,h_payto
+ ,CURRENT_TIMESTAMP(0)
+ ,(1,1):taler_amount) -- should be: NEW.amount_with_fee);
+
+-- FIXME: this is just for testing, I want to also check
+-- the 'counter'-based functions.
+ CALL exchange_do_bump_amount_stat
+ ('deposit-transactions'
+ ,h_payto
+ ,CURRENT_TIMESTAMP(0)
+ ,1);
+
+ -- Get historical deposit volumes and extract the yearly and monthly
+ -- interval statistic values from the result for the AML trigger check.
+ FOR my_rec IN
+ SELECT *
+ FROM exchange_statistic_interval_amount_get(
+ 'deposit-volume'
+ ,my_h_payto
+ )
+ LOOP
+ IF (my_rec.range = 60*60*24*7*52)
+ THEN
+ last_year = my_rec.rvalue;
+ END IF;
+ IF (my_rec.range = 60*60*24*7*4)
+ THEN
+ last_month = my_rec.rvalue;
+ END IF;
+ END LOOP
+ -- Note: it is OK to ignore '.frac', as that cannot be significant.
+ -- Also, we effectively exclude the current month's revenue from
+ -- "last year" as otherwise the rule makes no sense.
+ -- Finally, we define the "current month" always as the last 4 weeks,
+ -- just like the "last year" is the last 52 weeks.
+ IF last_year.val < last_month.val * 2
+ THEN
+ -- This is suspicious. => Flag account for AML review!
+ --
+ -- FIXME: we probably want to factor the code from
+ -- this branch out into a generic
+ -- function to trigger investigations at some point!
+ --
+ -- First, get existing rules and clear an 'is_active'
+ -- flag, but ONLY if we are not _already_ investigating
+ -- the account (as in the latter case, we'll do no INSERT).
+ UPDATE legitimization_outcomes
+ SET is_active=NOT to_investigate
+ WHERE h_payto = my_h_payto
+ AND is_active
+ RETURNING jproperties
+ ,new_measure_name
+ ,jnew_rules
+ ,to_investigate
+ INTO my_old_rules;
+
+ -- Note that if we have no active legitimization_outcome
+ -- that means we are on default rules and the account
+ -- did not cross KYC thresholds and thus we have no
+ -- established business relationship. In this case, we
+ -- do not care as the overall volume is insignificant.
+ -- This also takes care of the case where a customer
+ -- is new (and obviously the first few months are
+ -- basically always above the inherently zero or near-zero
+ -- transactions from the previous year).
+ -- Thus, we only proceed IF FOUND.
+ IF FOUND
+ THEN
+ my_properties = my_old_rules.jproperties;
+ my_measure_name = my_old_rules.new_measure_name;
+ my_rules = my_old_rules.jnew_rules;
+
+ -- Note: here we could in theory manipulate my_properties,
+ -- say to set a note as to why the investigation was started.
+ IF NOT my_old_rules.to_investigate
+ THEN
+ -- Only insert if 'to_investigate' was not already set.
+ INSERT INTO legitimization_outcomes (
+ h_payto
+ ,decision_time
+ ,expiration_time
+ ,jproperties
+ ,new_measure_name
+ ,to_investigate
+ ,is_active
+ ,jnew_rules
+ ) VALUES (
+ ,my_h_payto
+ ,my_now
+ ,my_now + 366*24*60*60
+ ,my_properties
+ ,my_measure_name
+ ,TRUE
+ ,TRUE
+ ,my_rules);
+ END IF;
+ END IF;
+ END IF;
+ RETURN NEW;
+END $$;
+COMMENT ON FUNCTION exchange_deposit_statistics_trigger
+ IS 'creates deposit statistics';
+
+-- Whenever a deposit is made, call our trigger to bump statistics
+CREATE TRIGGER exchange_batch_deposits_on_insert
+ AFTER INSERT
+ ON batch_deposits
+ FOR EACH ROW EXECUTE FUNCTION exchange_deposit_statistics_trigger();
+
+
+
+COMMIT;
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
@@ -3745,7 +3745,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure
*/
enum GNUNET_GenericReturnValue
- (*drop_tables)(void *cls);
+ (*drop_tables)(void *cls);
/**
* Create the necessary tables if they are not present
@@ -3758,9 +3758,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure
*/
enum GNUNET_GenericReturnValue
- (*create_tables)(void *cls,
- bool support_partitions,
- uint32_t num_partitions);
+ (*create_tables)(void *cls,
+ bool support_partitions,
+ uint32_t num_partitions);
/**
@@ -3772,8 +3772,8 @@ struct TALER_EXCHANGEDB_Plugin
* @return #GNUNET_OK on success
*/
enum GNUNET_GenericReturnValue
- (*start)(void *cls,
- const char *name);
+ (*start)(void *cls,
+ const char *name);
/**
@@ -3785,8 +3785,8 @@ struct TALER_EXCHANGEDB_Plugin
* @return #GNUNET_OK on success
*/
enum GNUNET_GenericReturnValue
- (*start_read_committed)(void *cls,
- const char *name);
+ (*start_read_committed)(void *cls,
+ const char *name);
/**
* Start a READ ONLY serializable transaction.
@@ -3797,8 +3797,8 @@ struct TALER_EXCHANGEDB_Plugin
* @return #GNUNET_OK on success
*/
enum GNUNET_GenericReturnValue
- (*start_read_only)(void *cls,
- const char *name);
+ (*start_read_only)(void *cls,
+ const char *name);
/**
@@ -3808,7 +3808,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*commit)(void *cls);
+ (*commit)(void *cls);
/**
@@ -3822,7 +3822,7 @@ struct TALER_EXCHANGEDB_Plugin
* #GNUNET_SYSERR on hard errors
*/
enum GNUNET_GenericReturnValue
- (*preflight)(void *cls);
+ (*preflight)(void *cls);
/**
@@ -3889,7 +3889,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return status of the query
*/
enum GNUNET_DB_QueryStatus
- (*insert_denomination_info)(
+ (*insert_denomination_info)(
void *cls,
const struct TALER_DenominationPublicKey *denom_pub,
const struct TALER_EXCHANGEDB_DenominationKeyInformation *issue);
@@ -3904,7 +3904,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_denomination_info)(
+ (*get_denomination_info)(
void *cls,
const struct TALER_DenominationHashP *denom_pub_hash,
struct TALER_EXCHANGEDB_DenominationKeyInformation *issue);
@@ -3922,9 +3922,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*iterate_denomination_info)(void *cls,
- TALER_EXCHANGEDB_DenominationCallback cb,
- void *cb_cls);
+ (*iterate_denomination_info)(void *cls,
+ TALER_EXCHANGEDB_DenominationCallback cb,
+ void *cb_cls);
/**
@@ -3938,9 +3938,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*iterate_denominations)(void *cls,
- TALER_EXCHANGEDB_DenominationsCallback cb,
- void *cb_cls);
+ (*iterate_denominations)(void *cls,
+ TALER_EXCHANGEDB_DenominationsCallback cb,
+ void *cb_cls);
/**
* Function called to invoke @a cb on every non-revoked exchange signing key
@@ -3953,9 +3953,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*iterate_active_signkeys)(void *cls,
- TALER_EXCHANGEDB_ActiveSignkeysCallback cb,
- void *cb_cls);
+ (*iterate_active_signkeys)(void *cls,
+ TALER_EXCHANGEDB_ActiveSignkeysCallback cb,
+ void *cb_cls);
/**
@@ -3968,9 +3968,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*iterate_active_auditors)(void *cls,
- TALER_EXCHANGEDB_AuditorsCallback cb,
- void *cb_cls);
+ (*iterate_active_auditors)(void *cls,
+ TALER_EXCHANGEDB_AuditorsCallback cb,
+ void *cb_cls);
/**
@@ -3984,7 +3984,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*iterate_auditor_denominations)(
+ (*iterate_auditor_denominations)(
void *cls,
TALER_EXCHANGEDB_AuditorDenominationsCallback cb,
void *cb_cls);
@@ -4000,8 +4000,8 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*reserves_get)(void *cls,
- struct TALER_EXCHANGEDB_Reserve *reserve);
+ (*reserves_get)(void *cls,
+ struct TALER_EXCHANGEDB_Reserve *reserve);
/**
@@ -4014,7 +4014,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*reserves_get_origin)(
+ (*reserves_get_origin)(
void *cls,
const struct TALER_ReservePublicKeyP *reserve_pub,
struct TALER_FullPaytoHashP *h_payto,
@@ -4030,9 +4030,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*drain_kyc_alert)(void *cls,
- uint32_t trigger_type,
- struct TALER_NormalizedPaytoHashP *h_payto);
+ (*drain_kyc_alert)(void *cls,
+ uint32_t trigger_type,
+ struct TALER_NormalizedPaytoHashP *h_payto);
/**
@@ -4046,7 +4046,7 @@ struct TALER_EXCHANGEDB_Plugin
* set to the status of the
*/
enum GNUNET_DB_QueryStatus
- (*reserves_in_insert)(
+ (*reserves_in_insert)(
void *cls,
const struct TALER_EXCHANGEDB_ReserveInInfo *reserves,
unsigned int reserves_length,
@@ -4067,7 +4067,7 @@ struct TALER_EXCHANGEDB_Plugin
* @param serial_id bank-specific row identifying the transfer
*/
enum GNUNET_DB_QueryStatus
- (*kycauth_in_insert)(
+ (*kycauth_in_insert)(
void *cls,
const union TALER_AccountPublicKeyP *account_pub,
const struct TALER_Amount *credit_amount,
@@ -4090,7 +4090,7 @@ struct TALER_EXCHANGEDB_Plugin
* @param serial_id bank-specific row identifying the transfer
*/
enum GNUNET_DB_QueryStatus
- (*wad_in_insert)(
+ (*wad_in_insert)(
void *cls,
const struct TALER_WadIdentifierP *wad_id,
const char *origin_exchange_url,
@@ -4111,10 +4111,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return statement execution status
*/
enum GNUNET_DB_QueryStatus
- (*lock_nonce)(void *cls,
- const struct GNUNET_CRYPTO_CsSessionNonce *nonce,
- const struct TALER_DenominationHashP *denom_pub_hash,
- const union TALER_EXCHANGEDB_NonceLockTargetP *target);
+ (*lock_nonce)(void *cls,
+ const struct GNUNET_CRYPTO_CsSessionNonce *nonce,
+ const struct TALER_DenominationHashP *denom_pub_hash,
+ const union TALER_EXCHANGEDB_NonceLockTargetP *target);
/**
@@ -4129,10 +4129,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return statement execution status
*/
enum GNUNET_DB_QueryStatus
- (*get_withdraw_info)(void *cls,
- const struct TALER_BlindedCoinHashP *bch,
- struct TALER_EXCHANGEDB_CollectableBlindcoin *
- collectable);
+ (*get_withdraw_info)(void *cls,
+ const struct TALER_BlindedCoinHashP *bch,
+ struct TALER_EXCHANGEDB_CollectableBlindcoin *
+ collectable);
/**
@@ -4163,7 +4163,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*do_batch_withdraw)(
+ (*do_batch_withdraw)(
void *cls,
struct GNUNET_TIME_Timestamp now,
const struct TALER_ReservePublicKeyP *reserve_pub,
@@ -4192,7 +4192,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*do_batch_withdraw_insert)(
+ (*do_batch_withdraw_insert)(
void *cls,
const union GNUNET_CRYPTO_BlindSessionNonce *nonce,
const struct TALER_EXCHANGEDB_CollectableBlindcoin *collectable,
@@ -4214,7 +4214,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return statement execution status
*/
enum GNUNET_DB_QueryStatus
- (*get_age_withdraw)(
+ (*get_age_withdraw)(
void *cls,
const struct TALER_ReservePublicKeyP *reserve_pub,
const struct TALER_AgeWithdrawCommitmentHashP *ach,
@@ -4236,7 +4236,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*do_age_withdraw)(
+ (*do_age_withdraw)(
void *cls,
const struct TALER_EXCHANGEDB_AgeWithdraw *commitment,
struct GNUNET_TIME_Timestamp now,
@@ -4257,7 +4257,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*get_policy_details)(
+ (*get_policy_details)(
void *cls,
const struct GNUNET_HashCode *hc,
struct TALER_PolicyDetails *detail);
@@ -4275,7 +4275,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*persist_policy_details)(
+ (*persist_policy_details)(
void *cls,
const struct TALER_PolicyDetails *details,
uint64_t *policy_details_serial_id,
@@ -4297,7 +4297,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*do_deposit)(
+ (*do_deposit)(
void *cls,
const struct TALER_EXCHANGEDB_BatchDeposit *bd,
struct GNUNET_TIME_Timestamp *exchange_timestamp,
@@ -4316,7 +4316,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*do_check_deposit_idempotent)(
+ (*do_check_deposit_idempotent)(
void *cls,
const struct TALER_EXCHANGEDB_BatchDeposit *bd,
struct GNUNET_TIME_Timestamp *exchange_timestamp,
@@ -4337,7 +4337,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*do_melt)(
+ (*do_melt)(
void *cls,
const struct TALER_RefreshMasterSecretP *rms,
struct TALER_EXCHANGEDB_Refresh *refresh,
@@ -4354,7 +4354,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*add_policy_fulfillment_proof)(
+ (*add_policy_fulfillment_proof)(
void *cls,
struct TALER_PolicyFulfillmentTransactionData *fulfillment);
@@ -4373,7 +4373,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*cs_refreshes_reveal)(
+ (*cs_refreshes_reveal)(
void *cls,
const struct GNUNET_CRYPTO_CsSessionNonce *nonce,
const struct TALER_CoinSpendPublicKeyP *old_coin_pub,
@@ -4396,7 +4396,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*do_refund)(
+ (*do_refund)(
void *cls,
const struct TALER_EXCHANGEDB_Refund *refund,
const struct TALER_Amount *deposit_fee,
@@ -4424,7 +4424,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*do_recoup)(
+ (*do_recoup)(
void *cls,
const struct TALER_ReservePublicKeyP *reserve_pub,
uint64_t reserve_out_serial_id,
@@ -4454,7 +4454,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*do_recoup_refresh)(
+ (*do_recoup_refresh)(
void *cls,
const struct TALER_CoinSpendPublicKeyP *old_coin_pub,
uint64_t rrc_serial,
@@ -4485,7 +4485,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*get_reserve_history)(
+ (*get_reserve_history)(
void *cls,
const struct TALER_ReservePublicKeyP *reserve_pub,
uint64_t start_off,
@@ -4506,7 +4506,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*get_reserve_balance)(
+ (*get_reserve_balance)(
void *cls,
const struct TALER_ReservePublicKeyP *reserve_pub,
struct TALER_Amount *balance,
@@ -4608,7 +4608,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status, non-negative on success
*/
enum GNUNET_DB_QueryStatus
- (*batch_ensure_coin_known)(
+ (*batch_ensure_coin_known)(
void *cls,
const struct TALER_CoinPublicInfo *coin,
struct TALER_EXCHANGEDB_CoinInfo *result,
@@ -4625,9 +4625,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status, non-negative on success
*/
enum GNUNET_DB_QueryStatus
- (*get_known_coin)(void *cls,
- const struct TALER_CoinSpendPublicKeyP *coin_pub,
- struct TALER_CoinPublicInfo *coin_info);
+ (*get_known_coin)(void *cls,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ struct TALER_CoinPublicInfo *coin_info);
/**
* Retrieve the signature and corresponding denomination for a given @a coin
@@ -4639,7 +4639,7 @@ struct TALER_EXCHANGEDB_Plugin
* @param[out] denom_sig the signature with the denomination's private key over the coin_pub
*/
enum GNUNET_DB_QueryStatus
- (*get_signature_for_known_coin)(
+ (*get_signature_for_known_coin)(
void *cls,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
struct TALER_DenominationPublicKey *denom_pub,
@@ -4655,10 +4655,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_coin_denomination)(void *cls,
- const struct TALER_CoinSpendPublicKeyP *coin_pub,
- uint64_t *known_coin_id,
- struct TALER_DenominationHashP *denom_hash);
+ (*get_coin_denomination)(void *cls,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ uint64_t *known_coin_id,
+ struct TALER_DenominationHashP *denom_hash);
/**
@@ -4673,7 +4673,7 @@ struct TALER_EXCHANGEDB_Plugin
* @param[out] h_wire hash of the wire details
*/
enum GNUNET_DB_QueryStatus
- (*get_wire_hash_for_contract)(
+ (*get_wire_hash_for_contract)(
void *cls,
const struct TALER_MerchantPublicKeyP *merchant_pub,
const struct TALER_PrivateContractHashP *h_contract_terms,
@@ -4697,7 +4697,7 @@ struct TALER_EXCHANGEDB_Plugin
*/
// FIXME: rename!
enum GNUNET_DB_QueryStatus
- (*have_deposit2)(
+ (*have_deposit2)(
void *cls,
const struct TALER_PrivateContractHashP *h_contract_terms,
const struct TALER_MerchantWireHashP *h_wire,
@@ -4717,8 +4717,8 @@ struct TALER_EXCHANGEDB_Plugin
* @return query result status
*/
enum GNUNET_DB_QueryStatus
- (*insert_refund)(void *cls,
- const struct TALER_EXCHANGEDB_Refund *refund);
+ (*insert_refund)(void *cls,
+ const struct TALER_EXCHANGEDB_Refund *refund);
/**
@@ -4733,7 +4733,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query result status
*/
enum GNUNET_DB_QueryStatus
- (*select_refunds_by_coin)(
+ (*select_refunds_by_coin)(
void *cls,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct TALER_MerchantPublicKeyP *merchant_pub,
@@ -4756,11 +4756,11 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_ready_deposit)(void *cls,
- uint64_t start_shard_row,
- uint64_t end_shard_row,
- struct TALER_MerchantPublicKeyP *merchant_pub,
- struct TALER_FullPayto *payto_uri);
+ (*get_ready_deposit)(void *cls,
+ uint64_t start_shard_row,
+ uint64_t end_shard_row,
+ struct TALER_MerchantPublicKeyP *merchant_pub,
+ struct TALER_FullPayto *payto_uri);
/**
@@ -4775,7 +4775,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*aggregate)(
+ (*aggregate)(
void *cls,
const struct TALER_FullPaytoHashP *h_payto,
const struct TALER_MerchantPublicKeyP *merchant_pub,
@@ -4796,7 +4796,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*create_aggregation_transient)(
+ (*create_aggregation_transient)(
void *cls,
const struct TALER_FullPaytoHashP *h_payto,
const char *exchange_account_section,
@@ -4818,7 +4818,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*select_aggregation_transient)(
+ (*select_aggregation_transient)(
void *cls,
const struct TALER_FullPaytoHashP *h_payto,
const struct TALER_MerchantPublicKeyP *merchant_pub,
@@ -4839,7 +4839,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*find_aggregation_transient)(
+ (*find_aggregation_transient)(
void *cls,
const struct TALER_NormalizedPaytoHashP *h_payto,
struct TALER_FullPayto *payto_uri,
@@ -4860,7 +4860,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*update_aggregation_transient)(
+ (*update_aggregation_transient)(
void *cls,
const struct TALER_FullPaytoHashP *h_payto,
const struct TALER_WireTransferIdentifierRawP *wtid,
@@ -4878,7 +4878,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*delete_aggregation_transient)(
+ (*delete_aggregation_transient)(
void *cls,
const struct TALER_FullPaytoHashP *h_payto,
const struct TALER_WireTransferIdentifierRawP *wtid);
@@ -4896,10 +4896,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*get_melt)(void *cls,
- const struct TALER_RefreshCommitmentP *rc,
- struct TALER_EXCHANGEDB_Melt *melt,
- uint64_t *melt_serial_id);
+ (*get_melt)(void *cls,
+ const struct TALER_RefreshCommitmentP *rc,
+ struct TALER_EXCHANGEDB_Melt *melt,
+ uint64_t *melt_serial_id);
/**
@@ -4917,7 +4917,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query status for the transaction
*/
enum GNUNET_DB_QueryStatus
- (*insert_refresh_reveal)(
+ (*insert_refresh_reveal)(
void *cls,
uint64_t melt_serial_id,
uint32_t num_rrcs,
@@ -4938,10 +4938,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*get_refresh_reveal)(void *cls,
- const struct TALER_RefreshCommitmentP *rc,
- TALER_EXCHANGEDB_RefreshCallback cb,
- void *cb_cls);
+ (*get_refresh_reveal)(void *cls,
+ const struct TALER_RefreshCommitmentP *rc,
+ TALER_EXCHANGEDB_RefreshCallback cb,
+ void *cb_cls);
/**
@@ -4957,10 +4957,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return statement execution status
*/
enum GNUNET_DB_QueryStatus
- (*get_link_data)(void *cls,
- const struct TALER_CoinSpendPublicKeyP *coin_pub,
- TALER_EXCHANGEDB_LinkCallback ldc,
- void *tdc_cls);
+ (*get_link_data)(void *cls,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ TALER_EXCHANGEDB_LinkCallback ldc,
+ void *tdc_cls);
/**
@@ -4985,7 +4985,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*get_coin_transactions)(
+ (*get_coin_transactions)(
void *cls,
bool begin_transaction,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
@@ -5020,7 +5020,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query status of the transaction
*/
enum GNUNET_DB_QueryStatus
- (*lookup_wire_transfer)(
+ (*lookup_wire_transfer)(
void *cls,
const struct TALER_WireTransferIdentifierRawP *wtid,
TALER_EXCHANGEDB_AggregationDataCallback cb,
@@ -5049,7 +5049,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*lookup_transfer_by_deposit)(
+ (*lookup_transfer_by_deposit)(
void *cls,
const struct TALER_PrivateContractHashP *h_contract_terms,
const struct TALER_MerchantWireHashP *h_wire,
@@ -5076,7 +5076,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_wire_fee)(
+ (*insert_wire_fee)(
void *cls,
const char *wire_method,
struct GNUNET_TIME_Timestamp start_date,
@@ -5099,7 +5099,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_global_fee)(
+ (*insert_global_fee)(
void *cls,
struct GNUNET_TIME_Timestamp start_date,
struct GNUNET_TIME_Timestamp end_date,
@@ -5124,7 +5124,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query status of the transaction
*/
enum GNUNET_DB_QueryStatus
- (*get_wire_fee)(
+ (*get_wire_fee)(
void *cls,
const char *type,
struct GNUNET_TIME_Timestamp date,
@@ -5150,7 +5150,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query status of the transaction
*/
enum GNUNET_DB_QueryStatus
- (*get_global_fee)(
+ (*get_global_fee)(
void *cls,
struct GNUNET_TIME_Timestamp date,
struct GNUNET_TIME_Timestamp *start_date,
@@ -5173,7 +5173,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*get_expired_reserves)(
+ (*get_expired_reserves)(
void *cls,
struct GNUNET_TIME_Timestamp now,
TALER_EXCHANGEDB_ReserveExpiredCallback rec,
@@ -5192,7 +5192,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*get_unfinished_close_requests)(
+ (*get_unfinished_close_requests)(
void *cls,
TALER_EXCHANGEDB_ReserveExpiredCallback rec,
void *rec_cls);
@@ -5213,7 +5213,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code, 0 if operation is already in the DB
*/
enum GNUNET_DB_QueryStatus
- (*insert_reserve_open_deposit)(
+ (*insert_reserve_open_deposit)(
void *cls,
const struct TALER_CoinPublicInfo *cpi,
const struct TALER_CoinSpendSignatureP *coin_sig,
@@ -5243,7 +5243,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*do_reserve_open)(
+ (*do_reserve_open)(
void *cls,
const struct TALER_ReservePublicKeyP *reserve_pub,
const struct TALER_Amount *total_paid,
@@ -5272,7 +5272,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code, 0 if reserve unknown
*/
enum GNUNET_DB_QueryStatus
- (*select_reserve_close_info)(
+ (*select_reserve_close_info)(
void *cls,
const struct TALER_ReservePublicKeyP *reserve_pub,
struct TALER_Amount *balance,
@@ -5295,7 +5295,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code, 0 if reserve unknown
*/
enum GNUNET_DB_QueryStatus
- (*select_reserve_close_request_info)(
+ (*select_reserve_close_request_info)(
void *cls,
const struct TALER_ReservePublicKeyP *reserve_pub,
uint64_t rowid,
@@ -5318,7 +5318,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code, @a kac aborting with #GNUNET_NO is not an error
*/
enum GNUNET_DB_QueryStatus
- (*iterate_reserve_close_info)(
+ (*iterate_reserve_close_info)(
void *cls,
const struct TALER_NormalizedPaytoHashP *h_payto,
struct GNUNET_TIME_Absolute time_limit,
@@ -5340,7 +5340,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_reserve_closed)(
+ (*insert_reserve_closed)(
void *cls,
const struct TALER_ReservePublicKeyP *reserve_pub,
struct GNUNET_TIME_Timestamp execution_date,
@@ -5361,10 +5361,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return query status code
*/
enum GNUNET_DB_QueryStatus
- (*wire_prepare_data_insert)(void *cls,
- const char *type,
- const char *buf,
- size_t buf_size);
+ (*wire_prepare_data_insert)(void *cls,
+ const char *type,
+ const char *buf,
+ size_t buf_size);
/**
@@ -5375,8 +5375,8 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*wire_prepare_data_mark_finished)(void *cls,
- uint64_t rowid);
+ (*wire_prepare_data_mark_finished)(void *cls,
+ uint64_t rowid);
/**
@@ -5387,8 +5387,8 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*wire_prepare_data_mark_failed)(void *cls,
- uint64_t rowid);
+ (*wire_prepare_data_mark_failed)(void *cls,
+ uint64_t rowid);
/**
@@ -5403,7 +5403,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*wire_prepare_data_get)(
+ (*wire_prepare_data_get)(
void *cls,
uint64_t start_row,
uint64_t limit,
@@ -5420,7 +5420,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return #GNUNET_OK on success
*/
enum GNUNET_GenericReturnValue
- (*start_deferred_wire_out)(void *cls);
+ (*start_deferred_wire_out)(void *cls);
/**
@@ -5437,7 +5437,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*store_wire_transfer_out)(
+ (*store_wire_transfer_out)(
void *cls,
struct GNUNET_TIME_Timestamp date,
const struct TALER_WireTransferIdentifierRawP *wtid,
@@ -5455,7 +5455,7 @@ struct TALER_EXCHANGEDB_Plugin
* #GNUNET_SYSERR on DB errors
*/
enum GNUNET_GenericReturnValue
- (*gc)(void *cls);
+ (*gc)(void *cls);
/**
@@ -5469,7 +5469,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_coin_deposits_above_serial_id)(
+ (*select_coin_deposits_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_DepositCallback cb,
@@ -5487,7 +5487,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_purse_requests_above_serial_id)(
+ (*select_purse_requests_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_PurseRequestCallback cb,
@@ -5505,7 +5505,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_purse_deposits_above_serial_id)(
+ (*select_purse_deposits_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_PurseDepositCallback cb,
@@ -5523,7 +5523,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_account_merges_above_serial_id)(
+ (*select_account_merges_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_AccountMergeCallback cb,
@@ -5541,7 +5541,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_purse_merges_above_serial_id)(
+ (*select_purse_merges_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_PurseMergeCallback cb,
@@ -5560,7 +5560,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_purse_decisions_above_serial_id)(
+ (*select_purse_decisions_above_serial_id)(
void *cls,
uint64_t serial_id,
bool refunded,
@@ -5579,7 +5579,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_all_purse_decisions_above_serial_id)(
+ (*select_all_purse_decisions_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_AllPurseDecisionCallback cb,
@@ -5597,7 +5597,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_all_purse_deletions_above_serial_id)(
+ (*select_all_purse_deletions_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_AllPurseDeletionsCallback cb,
@@ -5614,7 +5614,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_purse_deposits_by_purse)(
+ (*select_purse_deposits_by_purse)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
TALER_EXCHANGEDB_PurseRefundCoinCallback cb,
@@ -5632,7 +5632,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_refreshes_above_serial_id)(
+ (*select_refreshes_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_RefreshesCallback cb,
@@ -5650,7 +5650,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_refunds_above_serial_id)(
+ (*select_refunds_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_RefundCallback cb,
@@ -5668,7 +5668,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_reserves_in_above_serial_id)(
+ (*select_reserves_in_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_ReserveInCallback cb,
@@ -5687,7 +5687,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_reserves_in_above_serial_id_by_account)(
+ (*select_reserves_in_above_serial_id_by_account)(
void *cls,
const char *account_name,
uint64_t serial_id,
@@ -5707,7 +5707,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_withdrawals_above_serial_id)(
+ (*select_withdrawals_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_WithdrawCallback cb,
@@ -5725,7 +5725,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_wire_out_above_serial_id)(
+ (*select_wire_out_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_WireTransferOutCallback cb,
@@ -5743,7 +5743,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_wire_out_above_serial_id_by_account)(
+ (*select_wire_out_above_serial_id_by_account)(
void *cls,
const char *account_name,
uint64_t serial_id,
@@ -5762,7 +5762,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_recoup_above_serial_id)(
+ (*select_recoup_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_RecoupCallback cb,
@@ -5780,7 +5780,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_recoup_refresh_above_serial_id)(
+ (*select_recoup_refresh_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_RecoupRefreshCallback cb,
@@ -5798,7 +5798,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_reserve_open_above_serial_id)(
+ (*select_reserve_open_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_ReserveOpenCallback cb,
@@ -5816,7 +5816,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_reserve_closed_above_serial_id)(
+ (*select_reserve_closed_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_ReserveClosedCallback cb,
@@ -5834,7 +5834,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_reserve_by_h_blind)(
+ (*get_reserve_by_h_blind)(
void *cls,
const struct TALER_BlindedCoinHashP *bch,
struct TALER_ReservePublicKeyP *reserve_pub,
@@ -5852,7 +5852,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_old_coin_by_h_blind)(
+ (*get_old_coin_by_h_blind)(
void *cls,
const struct TALER_BlindedCoinHashP *h_blind_ev,
struct TALER_CoinSpendPublicKeyP *old_coin_pub,
@@ -5869,7 +5869,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_denomination_revocation)(
+ (*insert_denomination_revocation)(
void *cls,
const struct TALER_DenominationHashP *denom_pub_hash,
const struct TALER_MasterSignatureP *master_sig);
@@ -5886,7 +5886,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_denomination_revocation)(
+ (*get_denomination_revocation)(
void *cls,
const struct TALER_DenominationHashP *denom_pub_hash,
struct TALER_MasterSignatureP *master_sig,
@@ -5904,7 +5904,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_batch_deposits_missing_wire)(
+ (*select_batch_deposits_missing_wire)(
void *cls,
uint64_t min_batch_deposit_serial_id,
TALER_EXCHANGEDB_WireMissingCallback cb,
@@ -5922,7 +5922,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_aggregations_above_serial)(
+ (*select_aggregations_above_serial)(
void *cls,
uint64_t min_tracking_serial_id,
TALER_EXCHANGEDB_AggregationCallback cb,
@@ -5942,7 +5942,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_justification_for_missing_wire)(
+ (*select_justification_for_missing_wire)(
void *cls,
const struct TALER_FullPaytoHashP *wire_target_h_payto,
struct TALER_FullPayto *payto_uri,
@@ -5959,7 +5959,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*lookup_auditor_timestamp)(
+ (*lookup_auditor_timestamp)(
void *cls,
const struct TALER_AuditorPublicKeyP *auditor_pub,
struct GNUNET_TIME_Timestamp *last_date);
@@ -5976,7 +5976,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*lookup_auditor_status)(
+ (*lookup_auditor_status)(
void *cls,
const struct TALER_AuditorPublicKeyP *auditor_pub,
char **auditor_url,
@@ -5995,7 +5995,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_auditor)(
+ (*insert_auditor)(
void *cls,
const struct TALER_AuditorPublicKeyP *auditor_pub,
const char *auditor_url,
@@ -6016,7 +6016,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*update_auditor)(
+ (*update_auditor)(
void *cls,
const struct TALER_AuditorPublicKeyP *auditor_pub,
const char *auditor_url,
@@ -6034,9 +6034,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*lookup_wire_timestamp)(void *cls,
- const struct TALER_FullPayto payto_uri,
- struct GNUNET_TIME_Timestamp *last_date);
+ (*lookup_wire_timestamp)(void *cls,
+ const struct TALER_FullPayto payto_uri,
+ struct GNUNET_TIME_Timestamp *last_date);
/**
@@ -6056,15 +6056,15 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_wire)(void *cls,
- const struct TALER_FullPayto payto_uri,
- const char *conversion_url,
- const json_t *debit_restrictions,
- const json_t *credit_restrictions,
- struct GNUNET_TIME_Timestamp start_date,
- const struct TALER_MasterSignatureP *master_sig,
- const char *bank_label,
- int64_t priority);
+ (*insert_wire)(void *cls,
+ const struct TALER_FullPayto payto_uri,
+ const char *conversion_url,
+ const json_t *debit_restrictions,
+ const json_t *credit_restrictions,
+ struct GNUNET_TIME_Timestamp start_date,
+ const struct TALER_MasterSignatureP *master_sig,
+ const char *bank_label,
+ int64_t priority);
/**
@@ -6084,16 +6084,16 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*update_wire)(void *cls,
- const struct TALER_FullPayto payto_uri,
- const char *conversion_url,
- const json_t *debit_restrictions,
- const json_t *credit_restrictions,
- struct GNUNET_TIME_Timestamp change_date,
- const struct TALER_MasterSignatureP *master_sig,
- const char *bank_label,
- int64_t priority,
- bool enabled);
+ (*update_wire)(void *cls,
+ const struct TALER_FullPayto payto_uri,
+ const char *conversion_url,
+ const json_t *debit_restrictions,
+ const json_t *credit_restrictions,
+ struct GNUNET_TIME_Timestamp change_date,
+ const struct TALER_MasterSignatureP *master_sig,
+ const char *bank_label,
+ int64_t priority,
+ bool enabled);
/**
@@ -6105,9 +6105,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_wire_accounts)(void *cls,
- TALER_EXCHANGEDB_WireAccountCallback cb,
- void *cb_cls);
+ (*get_wire_accounts)(void *cls,
+ TALER_EXCHANGEDB_WireAccountCallback cb,
+ void *cb_cls);
/**
@@ -6121,10 +6121,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_wire_fees)(void *cls,
- const char *wire_method,
- TALER_EXCHANGEDB_WireFeeCallback cb,
- void *cb_cls);
+ (*get_wire_fees)(void *cls,
+ const char *wire_method,
+ TALER_EXCHANGEDB_WireFeeCallback cb,
+ void *cb_cls);
/**
@@ -6136,9 +6136,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_global_fees)(void *cls,
- TALER_EXCHANGEDB_GlobalFeeCallback cb,
- void *cb_cls);
+ (*get_global_fees)(void *cls,
+ TALER_EXCHANGEDB_GlobalFeeCallback cb,
+ void *cb_cls);
/**
@@ -6150,7 +6150,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_signkey_revocation)(
+ (*insert_signkey_revocation)(
void *cls,
const struct TALER_ExchangePublicKeyP *exchange_pub,
const struct TALER_MasterSignatureP *master_sig);
@@ -6165,7 +6165,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*lookup_signkey_revocation)(
+ (*lookup_signkey_revocation)(
void *cls,
const struct TALER_ExchangePublicKeyP *exchange_pub,
struct TALER_MasterSignatureP *master_sig);
@@ -6180,7 +6180,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*lookup_denomination_key)(
+ (*lookup_denomination_key)(
void *cls,
const struct TALER_DenominationHashP *h_denom_pub,
struct TALER_EXCHANGEDB_DenominationKeyMetaData *meta);
@@ -6197,7 +6197,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*add_denomination_key)(
+ (*add_denomination_key)(
void *cls,
const struct TALER_DenominationHashP *h_denom_pub,
const struct TALER_DenominationPublicKey *denom_pub,
@@ -6216,7 +6216,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*activate_signing_key)(
+ (*activate_signing_key)(
void *cls,
const struct TALER_ExchangePublicKeyP *exchange_pub,
const struct TALER_EXCHANGEDB_SignkeyMetaData *meta,
@@ -6232,7 +6232,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*lookup_signing_key)(
+ (*lookup_signing_key)(
void *cls,
const struct TALER_ExchangePublicKeyP *exchange_pub,
struct TALER_EXCHANGEDB_SignkeyMetaData *meta);
@@ -6248,7 +6248,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_auditor_denom_sig)(
+ (*insert_auditor_denom_sig)(
void *cls,
const struct TALER_DenominationHashP *h_denom_pub,
const struct TALER_AuditorPublicKeyP *auditor_pub,
@@ -6265,7 +6265,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_auditor_denom_sig)(
+ (*select_auditor_denom_sig)(
void *cls,
const struct TALER_DenominationHashP *h_denom_pub,
const struct TALER_AuditorPublicKeyP *auditor_pub,
@@ -6285,7 +6285,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*lookup_wire_fee_by_time)(
+ (*lookup_wire_fee_by_time)(
void *cls,
const char *wire_method,
struct GNUNET_TIME_Timestamp start_time,
@@ -6308,7 +6308,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*lookup_global_fee_by_time)(
+ (*lookup_global_fee_by_time)(
void *cls,
struct GNUNET_TIME_Timestamp start_time,
struct GNUNET_TIME_Timestamp end_time,
@@ -6329,9 +6329,9 @@ struct TALER_EXCHANGEDB_Plugin
* @a table does not have a serial number
*/
enum GNUNET_DB_QueryStatus
- (*lookup_serial_by_table)(void *cls,
- enum TALER_EXCHANGEDB_ReplicatedTable table,
- uint64_t *serial);
+ (*lookup_serial_by_table)(void *cls,
+ enum TALER_EXCHANGEDB_ReplicatedTable table,
+ uint64_t *serial);
/**
* Lookup records above @a serial number in @a table. Used in
@@ -6346,11 +6346,11 @@ struct TALER_EXCHANGEDB_Plugin
* @a table does not have a serial number
*/
enum GNUNET_DB_QueryStatus
- (*lookup_records_by_table)(void *cls,
- enum TALER_EXCHANGEDB_ReplicatedTable table,
- uint64_t serial,
- TALER_EXCHANGEDB_ReplicationCallback cb,
- void *cb_cls);
+ (*lookup_records_by_table)(void *cls,
+ enum TALER_EXCHANGEDB_ReplicatedTable table,
+ uint64_t serial,
+ TALER_EXCHANGEDB_ReplicationCallback cb,
+ void *cb_cls);
/**
@@ -6364,8 +6364,8 @@ struct TALER_EXCHANGEDB_Plugin
* @a table does not have a serial number
*/
enum GNUNET_DB_QueryStatus
- (*insert_records_by_table)(void *cls,
- const struct TALER_EXCHANGEDB_TableData *td);
+ (*insert_records_by_table)(void *cls,
+ const struct TALER_EXCHANGEDB_TableData *td);
/**
@@ -6381,12 +6381,12 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*begin_shard)(void *cls,
- const char *job_name,
- struct GNUNET_TIME_Relative delay,
- uint64_t shard_size,
- uint64_t *start_row,
- uint64_t *end_row);
+ (*begin_shard)(void *cls,
+ const char *job_name,
+ struct GNUNET_TIME_Relative delay,
+ uint64_t shard_size,
+ uint64_t *start_row,
+ uint64_t *end_row);
/**
* Function called to abort work on a shard.
@@ -6398,10 +6398,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*abort_shard)(void *cls,
- const char *job_name,
- uint64_t start_row,
- uint64_t end_row);
+ (*abort_shard)(void *cls,
+ const char *job_name,
+ uint64_t start_row,
+ uint64_t end_row);
/**
* Function called to persist that work on a shard was completed.
@@ -6413,10 +6413,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*complete_shard)(void *cls,
- const char *job_name,
- uint64_t start_row,
- uint64_t end_row);
+ (*complete_shard)(void *cls,
+ const char *job_name,
+ uint64_t start_row,
+ uint64_t end_row);
/**
@@ -6432,12 +6432,12 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*begin_revolving_shard)(void *cls,
- const char *job_name,
- uint32_t shard_size,
- uint32_t shard_limit,
- uint32_t *start_row,
- uint32_t *end_row);
+ (*begin_revolving_shard)(void *cls,
+ const char *job_name,
+ uint32_t shard_size,
+ uint32_t shard_limit,
+ uint32_t *start_row,
+ uint32_t *end_row);
/**
@@ -6451,10 +6451,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*release_revolving_shard)(void *cls,
- const char *job_name,
- uint32_t start_row,
- uint32_t end_row);
+ (*release_revolving_shard)(void *cls,
+ const char *job_name,
+ uint32_t start_row,
+ uint32_t end_row);
/**
@@ -6467,7 +6467,7 @@ struct TALER_EXCHANGEDB_Plugin
* #GNUNET_SYSERR on failure
*/
enum GNUNET_GenericReturnValue
- (*delete_shard_locks)(void *cls);
+ (*delete_shard_locks)(void *cls);
/**
@@ -6480,9 +6480,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*set_extension_manifest)(void *cls,
- const char *extension_name,
- const char *manifest);
+ (*set_extension_manifest)(void *cls,
+ const char *extension_name,
+ const char *manifest);
/**
@@ -6495,9 +6495,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_extension_manifest)(void *cls,
- const char *extension_name,
- char **manifest);
+ (*get_extension_manifest)(void *cls,
+ const char *extension_name,
+ char **manifest);
/**
@@ -6515,14 +6515,14 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_partner)(void *cls,
- const struct TALER_MasterPublicKeyP *master_pub,
- struct GNUNET_TIME_Timestamp start_date,
- struct GNUNET_TIME_Timestamp end_date,
- struct GNUNET_TIME_Relative wad_frequency,
- const struct TALER_Amount *wad_fee,
- const char *partner_base_url,
- const struct TALER_MasterSignatureP *master_sig);
+ (*insert_partner)(void *cls,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ struct GNUNET_TIME_Timestamp start_date,
+ struct GNUNET_TIME_Timestamp end_date,
+ struct GNUNET_TIME_Relative wad_frequency,
+ const struct TALER_Amount *wad_fee,
+ const char *partner_base_url,
+ const struct TALER_MasterSignatureP *master_sig);
/**
@@ -6538,10 +6538,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_contract)(void *cls,
- const struct TALER_PurseContractPublicKeyP *purse_pub,
- const struct TALER_EncryptedContract *econtract,
- bool *in_conflict);
+ (*insert_contract)(void *cls,
+ const struct TALER_PurseContractPublicKeyP *purse_pub,
+ const struct TALER_EncryptedContract *econtract,
+ bool *in_conflict);
/**
@@ -6556,7 +6556,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_contract)(
+ (*select_contract)(
void *cls,
const struct TALER_ContractDiffiePublicP *pub_ckey,
struct TALER_PurseContractPublicKeyP *purse_pub,
@@ -6574,7 +6574,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_contract_by_purse)(
+ (*select_contract_by_purse)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
struct TALER_EncryptedContract *econtract);
@@ -6600,7 +6600,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_purse_request)(
+ (*insert_purse_request)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
const struct TALER_PurseMergePublicKeyP *merge_pub,
@@ -6623,7 +6623,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code (#GNUNET_DB_STATUS_SUCCESS_NO_RESULTS if no purse expired in the given time interval).
*/
enum GNUNET_DB_QueryStatus
- (*expire_purse)(
+ (*expire_purse)(
void *cls,
struct GNUNET_TIME_Absolute start_time,
struct GNUNET_TIME_Absolute end_time);
@@ -6645,7 +6645,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_purse)(
+ (*select_purse)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
struct GNUNET_TIME_Timestamp *purse_creation,
@@ -6674,7 +6674,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_purse_request)(
+ (*get_purse_request)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
struct TALER_PurseMergePublicKeyP *merge_pub,
@@ -6702,7 +6702,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_purse_by_merge_pub)(
+ (*select_purse_by_merge_pub)(
void *cls,
const struct TALER_PurseMergePublicKeyP *merge_pub,
struct TALER_PurseContractPublicKeyP *purse_pub,
@@ -6738,7 +6738,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*do_purse_deposit)(
+ (*do_purse_deposit)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
@@ -6763,7 +6763,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*do_purse_delete)(
+ (*do_purse_delete)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
const struct TALER_PurseContractSignatureP *purse_sig,
@@ -6782,7 +6782,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*set_purse_balance)(
+ (*set_purse_balance)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
const struct TALER_Amount *balance);
@@ -6803,7 +6803,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_purse_deposit)(
+ (*get_purse_deposit)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
@@ -6833,7 +6833,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*do_purse_merge)(
+ (*do_purse_merge)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
const struct TALER_PurseMergeSignatureP *merge_sig,
@@ -6864,7 +6864,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*do_reserve_purse)(
+ (*do_reserve_purse)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
const struct TALER_PurseMergeSignatureP *merge_sig,
@@ -6891,7 +6891,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_purse_merge)(
+ (*select_purse_merge)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
struct TALER_PurseMergeSignatureP *merge_sig,
@@ -6914,13 +6914,13 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_close_request)(void *cls,
- const struct TALER_ReservePublicKeyP *reserve_pub,
- const struct TALER_FullPayto payto_uri,
- const struct TALER_ReserveSignatureP *reserve_sig,
- struct GNUNET_TIME_Timestamp request_timestamp,
- const struct TALER_Amount *balance,
- const struct TALER_Amount *closing_fee);
+ (*insert_close_request)(void *cls,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ const struct TALER_FullPayto payto_uri,
+ const struct TALER_ReserveSignatureP *reserve_sig,
+ struct GNUNET_TIME_Timestamp request_timestamp,
+ const struct TALER_Amount *balance,
+ const struct TALER_Amount *closing_fee);
/**
@@ -6936,13 +6936,13 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_drain_profit)(void *cls,
- const struct TALER_WireTransferIdentifierRawP *wtid,
- const char *account_section,
- const struct TALER_FullPayto payto_uri,
- struct GNUNET_TIME_Timestamp request_timestamp,
- const struct TALER_Amount *amount,
- const struct TALER_MasterSignatureP *master_sig);
+ (*insert_drain_profit)(void *cls,
+ const struct TALER_WireTransferIdentifierRawP *wtid,
+ const char *account_section,
+ const struct TALER_FullPayto payto_uri,
+ struct GNUNET_TIME_Timestamp request_timestamp,
+ const struct TALER_Amount *amount,
+ const struct TALER_MasterSignatureP *master_sig);
/**
@@ -6959,14 +6959,14 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_drain_profit)(void *cls,
- const struct TALER_WireTransferIdentifierRawP *wtid,
- uint64_t *serial,
- char **account_section,
- struct TALER_FullPayto *payto_uri,
- struct GNUNET_TIME_Timestamp *request_timestamp,
- struct TALER_Amount *amount,
- struct TALER_MasterSignatureP *master_sig);
+ (*get_drain_profit)(void *cls,
+ const struct TALER_WireTransferIdentifierRawP *wtid,
+ uint64_t *serial,
+ char **account_section,
+ struct TALER_FullPayto *payto_uri,
+ struct GNUNET_TIME_Timestamp *request_timestamp,
+ struct TALER_Amount *amount,
+ struct TALER_MasterSignatureP *master_sig);
/**
@@ -6983,7 +6983,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*profit_drains_get_pending)(
+ (*profit_drains_get_pending)(
void *cls,
uint64_t *serial,
struct TALER_WireTransferIdentifierRawP *wtid,
@@ -7002,7 +7002,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*profit_drains_set_finished)(
+ (*profit_drains_set_finished)(
void *cls,
uint64_t serial);
@@ -7028,7 +7028,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*trigger_kyc_rule_for_account)(
+ (*trigger_kyc_rule_for_account)(
void *cls,
const struct TALER_FullPayto payto_uri,
const struct TALER_NormalizedPaytoHashP *h_payto,
@@ -7057,7 +7057,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*insert_kyc_requirement_process)(
+ (*insert_kyc_requirement_process)(
void *cls,
const struct TALER_NormalizedPaytoHashP *h_payto,
uint32_t measure_index,
@@ -7078,7 +7078,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*get_pending_kyc_requirement_process)(
+ (*get_pending_kyc_requirement_process)(
void *cls,
const struct TALER_NormalizedPaytoHashP *h_payto,
const char *provider_name,
@@ -7103,7 +7103,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*update_kyc_process_by_row)(
+ (*update_kyc_process_by_row)(
void *cls,
uint64_t process_row,
const char *provider_name,
@@ -7139,7 +7139,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*lookup_kyc_requirement_by_row)(
+ (*lookup_kyc_requirement_by_row)(
void *cls,
const struct TALER_NormalizedPaytoHashP *h_payto,
union TALER_AccountPublicKeyP *account_pub,
@@ -7160,7 +7160,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*lookup_kyc_status_by_token)(
+ (*lookup_kyc_status_by_token)(
void *cls,
const struct TALER_AccountAccessTokenP *access_token,
uint64_t *row,
@@ -7177,7 +7177,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*lookup_rules_by_access_token)(
+ (*lookup_rules_by_access_token)(
void *cls,
const struct TALER_NormalizedPaytoHashP *h_payto,
json_t **jnew_rules,
@@ -7197,7 +7197,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*lookup_kyc_process_by_account)(
+ (*lookup_kyc_process_by_account)(
void *cls,
const char *provider_name,
const struct TALER_NormalizedPaytoHashP *h_payto,
@@ -7218,7 +7218,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*kyc_provider_account_lookup)(
+ (*kyc_provider_account_lookup)(
void *cls,
const char *provider_name,
const char *provider_legitimization_id,
@@ -7243,7 +7243,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_kyc_rules)(
+ (*get_kyc_rules)(
void *cls,
const struct TALER_NormalizedPaytoHashP *h_payto,
bool *no_account_pub,
@@ -7263,7 +7263,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_kyc_rules2)(
+ (*get_kyc_rules2)(
void *cls,
const struct TALER_NormalizedPaytoHashP *h_payto,
json_t **jrules);
@@ -7280,7 +7280,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*iterate_kyc_reference)(
+ (*iterate_kyc_reference)(
void *cls,
const struct TALER_NormalizedPaytoHashP *h_payto,
TALER_EXCHANGEDB_LegitimizationProcessCallback lpc,
@@ -7299,7 +7299,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code, @a kac aborting with #GNUNET_NO is not an error
*/
enum GNUNET_DB_QueryStatus
- (*select_withdraw_amounts_for_kyc_check)(
+ (*select_withdraw_amounts_for_kyc_check)(
void *cls,
const struct TALER_NormalizedPaytoHashP *h_payto,
struct GNUNET_TIME_Absolute time_limit,
@@ -7319,7 +7319,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code, @a kac aborting with #GNUNET_NO is not an error
*/
enum GNUNET_DB_QueryStatus
- (*select_aggregation_amounts_for_kyc_check)(
+ (*select_aggregation_amounts_for_kyc_check)(
void *cls,
const struct TALER_NormalizedPaytoHashP *h_payto,
struct GNUNET_TIME_Absolute time_limit,
@@ -7339,7 +7339,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code, @a kac aborting with #GNUNET_NO is not an error
*/
enum GNUNET_DB_QueryStatus
- (*select_merge_amounts_for_kyc_check)(
+ (*select_merge_amounts_for_kyc_check)(
void *cls,
const struct TALER_NormalizedPaytoHashP *h_payto,
struct GNUNET_TIME_Absolute time_limit,
@@ -7361,7 +7361,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code, @a kac aborting with #GNUNET_NO is not an error
*/
enum GNUNET_DB_QueryStatus
- (*select_deposit_amounts_for_kyc_check)(
+ (*select_deposit_amounts_for_kyc_check)(
void *cls,
const struct TALER_NormalizedPaytoHashP *h_payto,
struct GNUNET_TIME_Absolute time_limit,
@@ -7385,7 +7385,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*insert_sanction_list_hit)(
+ (*insert_sanction_list_hit)(
void *cls,
const struct TALER_NormalizedPaytoHashP *h_payto,
bool to_investigate,
@@ -7407,7 +7407,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*insert_aml_program_failure) (
+ (*insert_aml_program_failure)(
void *cls,
uint64_t process_row,
const struct TALER_NormalizedPaytoHashP *h_payto,
@@ -7419,7 +7419,7 @@ struct TALER_EXCHANGEDB_Plugin
* Revert account back to default rules and insert successor measure.
*/
enum GNUNET_DB_QueryStatus
- (*insert_successor_measure)(
+ (*insert_successor_measure)(
void *cls,
const struct TALER_NormalizedPaytoHashP *h_payto,
struct GNUNET_TIME_Timestamp decision_time,
@@ -7439,7 +7439,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*select_kyc_attributes)(
+ (*select_kyc_attributes)(
void *cls,
const struct TALER_NormalizedPaytoHashP *h_payto,
TALER_EXCHANGEDB_AttributeCallback cb,
@@ -7455,7 +7455,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*select_all_kyc_attributes)(
+ (*select_all_kyc_attributes)(
void *cls,
TALER_EXCHANGEDB_AllAttributesCallback cb,
void *cb_cls);
@@ -7476,7 +7476,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*select_aml_measures)(
+ (*select_aml_measures)(
void *cls,
const struct TALER_NormalizedPaytoHashP *h_payto,
enum TALER_EXCHANGE_YesNoAll active_only,
@@ -7500,7 +7500,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*insert_aml_officer)(
+ (*insert_aml_officer)(
void *cls,
const struct TALER_AmlOfficerPublicKeyP *decider_pub,
const struct TALER_MasterSignatureP *master_sig,
@@ -7520,7 +7520,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status, if member is unknown or not active, 1 if member is active
*/
enum GNUNET_DB_QueryStatus
- (*test_aml_officer)(
+ (*test_aml_officer)(
void *cls,
const struct TALER_AmlOfficerPublicKeyP *decider_pub);
@@ -7538,7 +7538,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*lookup_aml_officer)(
+ (*lookup_aml_officer)(
void *cls,
const struct TALER_AmlOfficerPublicKeyP *decider_pub,
struct TALER_MasterSignatureP *master_sig,
@@ -7560,7 +7560,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status, 0 if no threshold was set
*/
enum GNUNET_DB_QueryStatus
- (*select_aml_statistics)(
+ (*select_aml_statistics)(
void *cls,
const char *name,
struct GNUNET_TIME_Timestamp start_date,
@@ -7583,7 +7583,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*select_aml_decisions)(
+ (*select_aml_decisions)(
void *cls,
const struct TALER_NormalizedPaytoHashP *h_payto,
enum TALER_EXCHANGE_YesNoAll investigation_only,
@@ -7607,7 +7607,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*select_aml_attributes)(
+ (*select_aml_attributes)(
void *cls,
const struct TALER_NormalizedPaytoHashP *h_payto,
uint64_t offset,
@@ -7627,7 +7627,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*lookup_h_payto_by_access_token)(
+ (*lookup_h_payto_by_access_token)(
void *cls,
const struct TALER_AccountAccessTokenP *access_token,
struct TALER_NormalizedPaytoHashP *h_payto);
@@ -7650,7 +7650,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*lookup_pending_legitimization)(
+ (*lookup_pending_legitimization)(
void *cls,
uint64_t legitimization_measure_serial_id,
struct TALER_AccountAccessTokenP *access_token,
@@ -7683,7 +7683,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*lookup_completed_legitimization)(
+ (*lookup_completed_legitimization)(
void *cls,
uint64_t legitimization_measure_serial_id,
uint32_t measure_index,
@@ -7706,7 +7706,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*lookup_aml_history)(
+ (*lookup_aml_history)(
void *cls,
const struct TALER_NormalizedPaytoHashP *h_payto,
TALER_EXCHANGEDB_AmlHistoryCallback cb,
@@ -7724,7 +7724,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*lookup_kyc_history)(
+ (*lookup_kyc_history)(
void *cls,
const struct TALER_NormalizedPaytoHashP *h_payto,
TALER_EXCHANGEDB_KycHistoryCallback cb,
@@ -7744,7 +7744,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*lookup_active_legitimization) (
+ (*lookup_active_legitimization)(
void *cls,
uint64_t legitimization_process_serial_id,
uint32_t *measure_index,
@@ -7764,7 +7764,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*insert_active_legitimization_measure) (
+ (*insert_active_legitimization_measure)(
void *cls,
const struct TALER_AccountAccessTokenP *access_token,
const json_t *jmeasures,
@@ -7805,7 +7805,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*insert_aml_decision)(
+ (*insert_aml_decision)(
void *cls,
const struct TALER_FullPayto payto_uri,
const struct TALER_NormalizedPaytoHashP *h_payto,
@@ -7847,7 +7847,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*persist_kyc_attributes) (
+ (*persist_kyc_attributes)(
void *cls,
uint64_t process_row,
const struct TALER_NormalizedPaytoHashP *h_payto,
@@ -7874,7 +7874,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*insert_kyc_failure)(
+ (*insert_kyc_failure)(
void *cls,
uint64_t process_row,
const struct TALER_NormalizedPaytoHashP *h_payto,
@@ -7894,7 +7894,7 @@ struct TALER_EXCHANGEDB_Plugin
* #GNUNET_SYSERR on DB errors
*/
enum GNUNET_GenericReturnValue
- (*inject_auditor_triggers)(void *cls);
+ (*inject_auditor_triggers)(void *cls);
/**
@@ -7910,7 +7910,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*set_aml_lock) (
+ (*set_aml_lock)(
void *cls,
const struct TALER_NormalizedPaytoHashP *h_payto,
struct GNUNET_TIME_Relative lock_duration,
@@ -7930,7 +7930,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*clear_aml_lock) (
+ (*clear_aml_lock)(
void *cls,
const struct TALER_NormalizedPaytoHashP *h_payto);
@@ -7947,7 +7947,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*select_exchange_credit_transfers) (
+ (*select_exchange_credit_transfers)(
void *cls,
const struct TALER_Amount *threshold,
uint64_t offset,
@@ -7968,7 +7968,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*select_exchange_debit_transfers) (
+ (*select_exchange_debit_transfers)(
void *cls,
const struct TALER_Amount *threshold,
uint64_t offset,
@@ -7977,6 +7977,30 @@ struct TALER_EXCHANGEDB_Plugin
void *cb_cls);
+ /**
+ * Disable (delete/drop) customization rule schema from a deployment.
+ *
+ * @param cls closure
+ * @param schema name of the schema with customization rules to remove
+ * @return transaction status
+ */
+ enum GNUNET_DB_QueryStatus
+ (*disable_rules)(
+ void *cls,
+ const char *schema);
+
+ /**
+ * Enable (create/insert) customization rule schema from a deployment.
+ *
+ * @param cls closure
+ * @param schema name of the schema with customization rules to remove
+ * @return transaction status
+ */
+ enum GNUNET_GenericReturnValue
+ (*enable_rules)(
+ void *cls,
+ const char *schema);
+
};
#endif /* _TALER_EXCHANGE_DB_H */