exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit f3a762be1e18d1912ea5786a8b32443dcb6183ad
parent e6b6340f23f98d5e8889c43448d90df79720f7c8
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat,  8 Aug 2026 22:12:06 +0200

more DCE

Diffstat:
Dsrc/auditordb/get_wire_fee_summary.c | 57---------------------------------------------------------
Msrc/auditordb/meson.build | 2--
Dsrc/auditordb/update_wire_fee_summary.c | 45---------------------------------------------
Dsrc/include/auditor-database/get_wire_fee_summary.h | 42------------------------------------------
Dsrc/include/auditor-database/update_wire_fee_summary.h | 43-------------------------------------------
5 files changed, 0 insertions(+), 189 deletions(-)

diff --git a/src/auditordb/get_wire_fee_summary.c b/src/auditordb/get_wire_fee_summary.c @@ -1,57 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2022 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 get_wire_fee_summary.c - * @brief Low-level (statement-level) Postgres database access for the exchange - * @author Christian Grothoff - */ -#include "taler/taler_pq_lib.h" -#include "auditor-database/get_wire_fee_summary.h" -#include "pg_helper.h" - - -/** - * Get summary information about an exchanges wire fee balance. - * - * @param pg the database context - * @param[out] wire_fee_balance set amount the exchange gained in wire fees - * @return transaction status code - */ -enum GNUNET_DB_QueryStatus -TALER_AUDITORDB_get_wire_fee_summary ( - struct TALER_AUDITORDB_PostgresContext *pg, - struct TALER_Amount *wire_fee_balance) -{ - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_end - }; - struct GNUNET_PQ_ResultSpec rs[] = { - TALER_PQ_RESULT_SPEC_AMOUNT ("wire_fee_balance", - wire_fee_balance), - GNUNET_PQ_result_spec_end - }; - - PREPARE (pg, - "get_wire_fee_summary", - "SELECT" - " wire_fee_balance" - " FROM auditor_wire_fee_balance"); - return GNUNET_PQ_eval_prepared_singleton_select ( - pg->conn, - "get_wire_fee_summary", - params, - rs); -} diff --git a/src/auditordb/meson.build b/src/auditordb/meson.build @@ -143,7 +143,6 @@ libtalerauditordb = library( 'iterate_reserves.c', 'iterate_row_inconsistencies.c', 'iterate_row_minor_inconsistencies.c', - 'get_wire_fee_summary.c', 'iterate_wire_format_inconsistencies.c', 'iterate_wire_out_inconsistencies.c', 'helper.c', @@ -194,7 +193,6 @@ libtalerauditordb = library( 'update_to_suppressed.c', 'update_purse_info.c', 'update_reserve_info.c', - 'update_wire_fee_summary.c', ], soversion: solibversions['libtalerauditordb']['soversion'], version: solibversions['libtalerauditordb']['soversion'], diff --git a/src/auditordb/update_wire_fee_summary.c b/src/auditordb/update_wire_fee_summary.c @@ -1,45 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2022 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 update_wire_fee_summary.c - * @brief Low-level (statement-level) Postgres database access for the exchange - * @author Christian Grothoff - */ -#include "taler/taler_pq_lib.h" -#include "auditor-database/update_wire_fee_summary.h" -#include "pg_helper.h" - - -enum GNUNET_DB_QueryStatus -TALER_AUDITORDB_update_wire_fee_summary (struct - TALER_AUDITORDB_PostgresContext *pg, - const struct TALER_Amount * - wire_fee_balance) -{ - struct GNUNET_PQ_QueryParam params[] = { - TALER_PQ_query_param_amount (pg->conn, - wire_fee_balance), - GNUNET_PQ_query_param_end - }; - - PREPARE (pg, - "update_wire_fee_summary", - "UPDATE auditor_wire_fee_balance SET" - " wire_fee_balance=$1"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_wire_fee_summary", - params); -} diff --git a/src/include/auditor-database/get_wire_fee_summary.h b/src/include/auditor-database/get_wire_fee_summary.h @@ -1,42 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2022 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 get_wire_fee_summary.h - * @brief implementation of the get_wire_fee_summary function - * @author Christian Grothoff - */ -#ifndef AUDITOR_DATABASE_GET_WIRE_FEE_SUMMARY_H -#define AUDITOR_DATABASE_GET_WIRE_FEE_SUMMARY_H - -#include "taler/taler_util.h" -#include "taler/taler_json_lib.h" -#include "auditordb_lib.h" - - -/** - * Get summary information about an exchanges wire fee balance. - * - * @param pg the database context - * @param[out] wire_fee_balance set amount the exchange gained in wire fees - * @return transaction status code - */ -enum GNUNET_DB_QueryStatus -TALER_AUDITORDB_get_wire_fee_summary (struct TALER_AUDITORDB_PostgresContext *pg - , - struct TALER_Amount *wire_fee_balance); - - -#endif diff --git a/src/include/auditor-database/update_wire_fee_summary.h b/src/include/auditor-database/update_wire_fee_summary.h @@ -1,43 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2022 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 update_wire_fee_summary.h - * @brief implementation of the update_wire_fee_summary function - * @author Christian Grothoff - */ -#ifndef AUDITOR_DATABASE_UPDATE_WIRE_FEE_SUMMARY_H -#define AUDITOR_DATABASE_UPDATE_WIRE_FEE_SUMMARY_H - -#include "taler/taler_util.h" -#include "taler/taler_json_lib.h" -#include "auditordb_lib.h" - - -/** - * Insert information about exchange's wire fee balance. Destructively updates an - * existing record, which must already exist. - * - * @param pg the database context - * @param wire_fee_balance amount the exchange gained in wire fees - * @return transaction status code - */ -enum GNUNET_DB_QueryStatus -TALER_AUDITORDB_update_wire_fee_summary (struct - TALER_AUDITORDB_PostgresContext *pg, - const struct TALER_Amount * - wire_fee_balance); - -#endif