exchange

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

commit 992643676edf19369a3c0d8a1e45efb0f1a17b6a
parent 5c0d07b2cfc4027deab30b92af4138c26341b5e3
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Wed, 15 Jul 2026 23:14:31 +0200

-DCE

Diffstat:
Msrc/exchangedb/get_reserve_history.c | 48------------------------------------------------
1 file changed, 0 insertions(+), 48 deletions(-)

diff --git a/src/exchangedb/get_reserve_history.c b/src/exchangedb/get_reserve_history.c @@ -61,16 +61,6 @@ struct ReserveHistoryContext struct TALER_EXCHANGEDB_PostgresContext *pg; /** - * Sum of all credit transactions. - */ - struct TALER_Amount balance_in; - - /** - * Sum of all debit transactions. - */ - struct TALER_Amount balance_out; - - /** * Current reserve_history_serial_id being processed, * set before each sub-table callback. */ @@ -157,10 +147,6 @@ add_bank_to_exchange (void *cls, return; } } - GNUNET_assert (0 <= - TALER_amount_add (&rhc->balance_in, - &rhc->balance_in, - &bt->amount)); bt->reserve_pub = *rhc->reserve_pub; tail = append_rh (rhc); tail->type = TALER_EXCHANGEDB_RO_BANK_TO_EXCHANGE; @@ -332,10 +318,6 @@ add_recoup (void *cls, return; } } - GNUNET_assert (0 <= - TALER_amount_add (&rhc->balance_in, - &rhc->balance_in, - &recoup->value)); recoup->reserve_pub = *rhc->reserve_pub; tail = append_rh (rhc); tail->type = TALER_EXCHANGEDB_RO_RECOUP_COIN; @@ -393,10 +375,6 @@ add_exchange_to_bank (void *cls, return; } } - GNUNET_assert (0 <= - TALER_amount_add (&rhc->balance_out, - &rhc->balance_out, - &closing->amount)); closing->reserve_pub = *rhc->reserve_pub; tail = append_rh (rhc); tail->type = TALER_EXCHANGEDB_RO_EXCHANGE_TO_BANK; @@ -473,15 +451,6 @@ add_p2p_merge (void *cls, &merge->amount_with_fee)) ) merge->merged = true; } - if (merge->merged) - GNUNET_assert (0 <= - TALER_amount_add (&rhc->balance_in, - &rhc->balance_in, - &merge->amount_with_fee)); - GNUNET_assert (0 <= - TALER_amount_add (&rhc->balance_out, - &rhc->balance_out, - &merge->purse_fee)); merge->reserve_pub = *rhc->reserve_pub; tail = append_rh (rhc); tail->type = TALER_EXCHANGEDB_RO_PURSE_MERGE; @@ -538,10 +507,6 @@ add_open_requests (void *cls, return; } } - GNUNET_assert (0 <= - TALER_amount_add (&rhc->balance_out, - &rhc->balance_out, - &orq->open_fee)); orq->reserve_pub = *rhc->reserve_pub; tail = append_rh (rhc); tail->type = TALER_EXCHANGEDB_RO_OPEN_REQUEST; @@ -757,13 +722,6 @@ TALER_EXCHANGEDB_get_reserve_history ( GNUNET_PQ_query_param_end }; - GNUNET_assert (GNUNET_OK == - TALER_amount_set_zero (pg->currency, - &rhc.balance_in)); - GNUNET_assert (GNUNET_OK == - TALER_amount_set_zero (pg->currency, - &rhc.balance_out)); - *rhp = NULL; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Getting transactions for reserve %s\n", @@ -987,12 +945,6 @@ TALER_EXCHANGEDB_get_reserve_history ( TALER_EXCHANGEDB_free_reserve_history (rhc.rh); rhc.rh = NULL; rhc.rh_tail = NULL; - GNUNET_assert (GNUNET_OK == - TALER_amount_set_zero (pg->currency, - &rhc.balance_in)); - GNUNET_assert (GNUNET_OK == - TALER_amount_set_zero (pg->currency, - &rhc.balance_out)); continue; case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: