exchange

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

commit 79b15a5351d05cbbc4fee77739523c940adb12ae
parent af6f2bb11e6ff60202d10e7623b3c66ef0882550
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu, 13 Aug 2026 18:54:44 +0200

dce

Diffstat:
Msrc/auditor/taler-auditor-sync.c | 1-
Msrc/exchangedb/meson.build | 1-
Dsrc/exchangedb/update_purse_balance.c | 48------------------------------------------------
Dsrc/include/exchange-database/update_purse_balance.h | 46----------------------------------------------
4 files changed, 0 insertions(+), 96 deletions(-)

diff --git a/src/auditor/taler-auditor-sync.c b/src/auditor/taler-auditor-sync.c @@ -201,7 +201,6 @@ struct InsertContext; #include "exchange-database/iterate_withdrawals_above_serial_id.h" #include "exchange-database/iterate_withdraw_amounts_for_kyc_check.h" #include "exchange-database/update_to_aml_locked.h" -#include "exchange-database/update_purse_balance.h" #include "exchange-database/start_deferred_wire_out.h" #include "exchange-database/start.h" #include "exchange-database/start_read_committed.h" diff --git a/src/exchangedb/meson.build b/src/exchangedb/meson.build @@ -243,7 +243,6 @@ libtalerexchangedb = library( 'iterate_withdrawals_above_serial_id.c', 'iterate_withdraw_amounts_for_kyc_check.c', 'update_to_aml_locked.c', - 'update_purse_balance.c', 'start.c', 'start_deferred_wire_out.c', 'start_read_committed.c', diff --git a/src/exchangedb/update_purse_balance.c b/src/exchangedb/update_purse_balance.c @@ -1,48 +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 exchangedb/update_purse_balance.c - * @brief Implementation of the update_purse_balance function for Postgres - * @author Christian Grothoff - */ -#include "taler/taler_pq_lib.h" -#include "exchange-database/update_purse_balance.h" -#include "helper.h" - - -enum GNUNET_DB_QueryStatus -TALER_EXCHANGEDB_update_purse_balance ( - struct TALER_EXCHANGEDB_PostgresContext *pg, - const struct TALER_PurseContractPublicKeyP *purse_pub, - const struct TALER_Amount *balance) -{ - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_auto_from_type (purse_pub), - TALER_PQ_query_param_amount (pg->conn, - balance), - GNUNET_PQ_query_param_end - }; - - PREPARE (pg, - "update_purse_balance", - "UPDATE purse_requests" - " SET balance=$2" - " WHERE purse_pub=$1;"); - - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_purse_balance", - params); -} diff --git a/src/include/exchange-database/update_purse_balance.h b/src/include/exchange-database/update_purse_balance.h @@ -1,46 +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 src/include/exchange-database/update_purse_balance.h - * @brief implementation of the update_purse_balance function for Postgres - * @author Christian Grothoff - */ -#ifndef EXCHANGE_DATABASE_UPDATE_PURSE_BALANCE_H -#define EXCHANGE_DATABASE_UPDATE_PURSE_BALANCE_H - -#include "taler/taler_util.h" -#include "taler/taler_json_lib.h" -#include "exchangedb_lib.h" - -/** - * Set the current @a balance in the purse - * identified by @a purse_pub. Used by the auditor - * to update the balance as calculated by the auditor. - * - * @param pg the database context - * @param purse_pub public key of a purse - * @param balance new balance to store under the purse - * @return transaction status - */ -enum GNUNET_DB_QueryStatus -TALER_EXCHANGEDB_update_purse_balance (struct TALER_EXCHANGEDB_PostgresContext * - pg, - const struct - TALER_PurseContractPublicKeyP * - purse_pub, - const struct TALER_Amount *balance); - -#endif