summaryrefslogtreecommitdiff
path: root/src/exchange
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2021-10-24 12:25:57 +0200
committerChristian Grothoff <christian@grothoff.org>2021-10-27 09:23:12 +0200
commit464c1f806cd1518ebd87b598c7d8232e9f234ac2 (patch)
tree13f932e3a7c5494c1c8b15aabf6897844598faf6 /src/exchange
parentd4e03b12ae96d9e540d28b03f11a58dd4101832a (diff)
downloadexchange-464c1f806cd1518ebd87b598c7d8232e9f234ac2.tar.gz
exchange-464c1f806cd1518ebd87b598c7d8232e9f234ac2.tar.bz2
exchange-464c1f806cd1518ebd87b598c7d8232e9f234ac2.zip
-more changes towards fixing FTBFS
Diffstat (limited to 'src/exchange')
-rw-r--r--src/exchange/taler-exchange-aggregator.c4
-rw-r--r--src/exchange/taler-exchange-closer.c7
2 files changed, 6 insertions, 5 deletions
diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c
index afedd7e3..22bc3c7b 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 91ececc8..a206cea8 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,