From 464c1f806cd1518ebd87b598c7d8232e9f234ac2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 24 Oct 2021 12:25:57 +0200 Subject: -more changes towards fixing FTBFS --- src/exchange/taler-exchange-aggregator.c | 4 ++-- src/exchange/taler-exchange-closer.c | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src/exchange') diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c index afedd7e37..22bc3c7bb 100644 --- a/src/exchange/taler-exchange-aggregator.c +++ b/src/exchange/taler-exchange-aggregator.c @@ -363,7 +363,7 @@ deposit_cb (void *cls, const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_Amount *amount_with_fee, const struct TALER_Amount *deposit_fee, - const struct GNUNET_HashCode *h_contract_terms, + const struct TALER_PrivateContractHash *h_contract_terms, const json_t *wire) { struct AggregationUnit *au = cls; @@ -528,7 +528,7 @@ aggregate_cb (void *cls, const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_Amount *amount_with_fee, const struct TALER_Amount *deposit_fee, - const struct GNUNET_HashCode *h_contract_terms) + const struct TALER_PrivateContractHash *h_contract_terms) { struct AggregationUnit *au = cls; struct TALER_Amount old; diff --git a/src/exchange/taler-exchange-closer.c b/src/exchange/taler-exchange-closer.c index 91ececc85..a206cea80 100644 --- a/src/exchange/taler-exchange-closer.c +++ b/src/exchange/taler-exchange-closer.c @@ -217,7 +217,7 @@ expired_reserve_cb (void *cls, struct TALER_WireTransferIdentifierRawP wtid; struct TALER_Amount amount_without_fee; struct TALER_Amount closing_fee; - int ret; + enum TALER_AmountArithmeticResult ret; enum GNUNET_DB_QueryStatus qs; const struct TALER_EXCHANGEDB_AccountInfo *wa; @@ -273,8 +273,8 @@ expired_reserve_cb (void *cls, ret = TALER_amount_subtract (&amount_without_fee, left, &closing_fee); - if ( (GNUNET_SYSERR == ret) || - (GNUNET_NO == ret) ) + if ( (TALER_AAR_INVALID_NEGATIVE_RESULT == ret) || + (TALER_AAR_RESULT_ZERO == ret) ) { /* Closing fee higher than or equal to remaining balance, close without wire transfer. */ @@ -283,6 +283,7 @@ expired_reserve_cb (void *cls, TALER_amount_set_zero (left->currency, &amount_without_fee)); } + GNUNET_assert (TALER_AAR_RESULT_POSITIVE == ret); /* round down to enable transfer */ if (GNUNET_SYSERR == TALER_amount_round_down (&amount_without_fee, -- cgit v1.2.3