[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: rename insert_kyc_attributes to
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: rename insert_kyc_attributes to insert_kyc_measure_result |
Date: |
Tue, 05 Nov 2024 15:05:40 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new eb4a284cb rename insert_kyc_attributes to insert_kyc_measure_result
eb4a284cb is described below
commit eb4a284cb5335010cba85c4d2b9ee09e85bb0580
Author: Florian Dold <florian@dold.me>
AuthorDate: Tue Nov 5 15:05:10 2024 +0100
rename insert_kyc_attributes to insert_kyc_measure_result
This reflects much better what the DB query does.
---
src/exchange/taler-exchange-httpd_common_kyc.c | 6 +++---
src/exchangedb/Makefile.am | 2 +-
...ql => exchange_do_insert_kyc_measure_result.sql} | 6 +++---
..._attributes.c => pg_insert_kyc_measure_result.c} | 21 +++++++--------------
..._attributes.h => pg_insert_kyc_measure_result.h} | 6 +++---
src/exchangedb/plugin_exchangedb_postgres.c | 6 +++---
src/exchangedb/procedures.sql.in | 2 +-
src/include/taler_exchangedb_plugin.h | 2 +-
8 files changed, 22 insertions(+), 29 deletions(-)
diff --git a/src/exchange/taler-exchange-httpd_common_kyc.c
b/src/exchange/taler-exchange-httpd_common_kyc.c
index 7672900d3..4e63aed68 100644
--- a/src/exchange/taler-exchange-httpd_common_kyc.c
+++ b/src/exchange/taler-exchange-httpd_common_kyc.c
@@ -305,7 +305,7 @@ kyc_aml_finished (
kat->attributes,
&ea,
&eas);
- qs = TEH_plugin->insert_kyc_attributes (
+ qs = TEH_plugin->insert_kyc_measure_result (
TEH_plugin->cls,
kat->process_row,
&kat->account_id,
@@ -337,7 +337,7 @@ kyc_aml_finished (
kat->response
= TALER_MHD_make_error (
TALER_EC_GENERIC_DB_STORE_FAILED,
- "do_insert_kyc_attributes");
+ "do_insert_kyc_measure_result");
/* Continued below to return the response */
}
RETURN_RESULT:
@@ -786,7 +786,7 @@ handle_aml_fallback_result (
&eas);
json_decref (attributes);
}
- qs = TEH_plugin->insert_kyc_attributes (
+ qs = TEH_plugin->insert_kyc_measure_result (
TEH_plugin->cls,
fb->orig_requirement_row,
&fb->account_id,
diff --git a/src/exchangedb/Makefile.am b/src/exchangedb/Makefile.am
index dfc85e5dc..e517ac1b9 100644
--- a/src/exchangedb/Makefile.am
+++ b/src/exchangedb/Makefile.am
@@ -187,7 +187,7 @@ libtaler_plugin_exchangedb_postgres_la_SOURCES = \
pg_have_deposit2.h pg_have_deposit2.c \
pg_aggregate.h pg_aggregate.c \
pg_create_aggregation_transient.h pg_create_aggregation_transient.c \
- pg_insert_kyc_attributes.h pg_insert_kyc_attributes.c \
+ pg_insert_kyc_measure_result.h pg_insert_kyc_measure_result.c \
pg_select_kyc_attributes.h pg_select_kyc_attributes.c \
pg_insert_aml_officer.h pg_insert_aml_officer.c \
pg_test_aml_officer.h pg_test_aml_officer.c \
diff --git a/src/exchangedb/exchange_do_insert_kyc_attributes.sql
b/src/exchangedb/exchange_do_insert_kyc_measure_result.sql
similarity index 93%
rename from src/exchangedb/exchange_do_insert_kyc_attributes.sql
rename to src/exchangedb/exchange_do_insert_kyc_measure_result.sql
index 8615d7bc5..228e7926f 100644
--- a/src/exchangedb/exchange_do_insert_kyc_attributes.sql
+++ b/src/exchangedb/exchange_do_insert_kyc_measure_result.sql
@@ -14,8 +14,8 @@
-- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
--
-DROP FUNCTION IF EXISTS exchange_do_insert_kyc_attributes;
-CREATE FUNCTION exchange_do_insert_kyc_attributes(
+DROP FUNCTION IF EXISTS exchange_do_insert_kyc_measure_result;
+CREATE FUNCTION exchange_do_insert_kyc_measure_result(
IN in_process_row INT8,
IN in_h_payto BYTEA,
IN in_birthday INT4,
@@ -147,5 +147,5 @@ INSERT INTO kyc_alerts
END $$;
-COMMENT ON FUNCTION exchange_do_insert_kyc_attributes(INT8, BYTEA, INT4, TEXT,
TEXT, TEXT, INT8, INT8, INT8, TEXT, TEXT, TEXT[], BYTEA, BOOL, TEXT)
+COMMENT ON FUNCTION exchange_do_insert_kyc_measure_result(INT8, BYTEA, INT4,
TEXT, TEXT, TEXT, INT8, INT8, INT8, TEXT, TEXT, TEXT[], BYTEA, BOOL, TEXT)
IS 'Inserts new KYC attributes and updates the status of the legitimization
process and the AML status for the account';
diff --git a/src/exchangedb/pg_insert_kyc_attributes.c
b/src/exchangedb/pg_insert_kyc_measure_result.c
similarity index 88%
rename from src/exchangedb/pg_insert_kyc_attributes.c
rename to src/exchangedb/pg_insert_kyc_measure_result.c
index ceb9677b2..11a9ff1f1 100644
--- a/src/exchangedb/pg_insert_kyc_attributes.c
+++ b/src/exchangedb/pg_insert_kyc_measure_result.c
@@ -14,27 +14,20 @@
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
- * @file exchangedb/pg_insert_kyc_attributes.c
- * @brief Implementation of the insert_kyc_attributes function for Postgres
+ * @file exchangedb/pg_insert_kyc_measure_result.c
+ * @brief Implementation of the insert_kyc_measure_result 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_insert_kyc_attributes.h"
+#include "pg_insert_kyc_measure_result.h"
#include "pg_helper.h"
-/*
- * FIXME:
- * This function does *so* much more than inserting KYC attributes.
- * Sometimes it doesn't even insert KYC attributes at all.
- * => Rename?
- */
-
enum GNUNET_DB_QueryStatus
-TEH_PG_insert_kyc_attributes (
+TEH_PG_insert_kyc_measure_result (
void *cls,
uint64_t process_row,
const struct TALER_NormalizedPaytoHashP *h_payto,
@@ -106,13 +99,13 @@ TEH_PG_insert_kyc_attributes (
GNUNET_break (NULL != h_payto);
GNUNET_break (NULL != enc_attributes);
PREPARE (pg,
- "insert_kyc_attributes",
+ "insert_kyc_measure_result",
"SELECT "
" out_ok"
- " FROM exchange_do_insert_kyc_attributes "
+ " FROM exchange_do_insert_kyc_measure_result "
"($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14,
$15);");
qs = GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
- "insert_kyc_attributes",
+ "insert_kyc_measure_result",
params,
rs);
GNUNET_PQ_cleanup_query_params_closures (params);
diff --git a/src/exchangedb/pg_insert_kyc_attributes.h
b/src/exchangedb/pg_insert_kyc_measure_result.h
similarity index 93%
rename from src/exchangedb/pg_insert_kyc_attributes.h
rename to src/exchangedb/pg_insert_kyc_measure_result.h
index cc8c9a754..eed72dc14 100644
--- a/src/exchangedb/pg_insert_kyc_attributes.h
+++ b/src/exchangedb/pg_insert_kyc_measure_result.h
@@ -14,8 +14,8 @@
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
- * @file exchangedb/pg_insert_kyc_attributes.h
- * @brief implementation of the insert_kyc_attributes function for Postgres
+ * @file exchangedb/pg_insert_kyc_measure_result.h
+ * @brief implementation of the insert_kyc_measure_result function for Postgres
* @author Christian Grothoff
*/
#ifndef PG_INSERT_KYC_ATTRIBUTES_H
@@ -49,7 +49,7 @@
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
-TEH_PG_insert_kyc_attributes (
+TEH_PG_insert_kyc_measure_result (
void *cls,
uint64_t process_row,
const struct TALER_NormalizedPaytoHashP *h_payto,
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c
b/src/exchangedb/plugin_exchangedb_postgres.c
index d07c32919..6118cec01 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -222,7 +222,7 @@
#include "pg_set_purse_balance.h"
#include "pg_reserves_update.h"
#include "pg_compute_shard.h"
-#include "pg_insert_kyc_attributes.h"
+#include "pg_insert_kyc_measure_result.h"
#include "pg_select_kyc_attributes.h"
#include "pg_insert_aml_officer.h"
#include "pg_test_aml_officer.h"
@@ -805,8 +805,8 @@ libtaler_plugin_exchangedb_postgres_init (void *cls)
= &TEH_PG_set_purse_balance;
plugin->get_pending_kyc_requirement_process
= &TEH_PG_get_pending_kyc_requirement_process;
- plugin->insert_kyc_attributes
- = &TEH_PG_insert_kyc_attributes;
+ plugin->insert_kyc_measure_result
+ = &TEH_PG_insert_kyc_measure_result;
plugin->select_kyc_attributes
= &TEH_PG_select_kyc_attributes;
plugin->insert_aml_officer
diff --git a/src/exchangedb/procedures.sql.in b/src/exchangedb/procedures.sql.in
index 0c25e8f5d..683a9320c 100644
--- a/src/exchangedb/procedures.sql.in
+++ b/src/exchangedb/procedures.sql.in
@@ -45,7 +45,7 @@ SET search_path TO exchange;
#include "exchange_do_insert_or_update_policy_details.sql"
#include "exchange_do_insert_aml_decision.sql"
#include "exchange_do_insert_aml_officer.sql"
-#include "exchange_do_insert_kyc_attributes.sql"
+#include "exchange_do_insert_kyc_measure_result.sql"
#include "exchange_do_reserves_in_insert.sql"
#include "exchange_do_batch_reserves_update.sql"
#include "exchange_do_get_link_data.sql"
diff --git a/src/include/taler_exchangedb_plugin.h
b/src/include/taler_exchangedb_plugin.h
index 0b9028de3..e3f447c38 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -7297,7 +7297,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*insert_kyc_attributes)(
+ (*insert_kyc_measure_result)(
void *cls,
uint64_t process_row,
const struct TALER_NormalizedPaytoHashP *h_payto,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: rename insert_kyc_attributes to insert_kyc_measure_result,
gnunet <=