aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/exchange/taler-exchange-closer.c14
-rw-r--r--src/exchange/taler-exchange-httpd_auditors.c6
-rw-r--r--src/exchange/taler-exchange-httpd_auditors.h2
-rw-r--r--src/exchange/taler-exchange-httpd_deposits_get.c4
-rw-r--r--src/util/offline_signatures.c16
5 files changed, 19 insertions, 23 deletions
diff --git a/src/exchange/taler-exchange-closer.c b/src/exchange/taler-exchange-closer.c
index a206cea80..3f30db7ba 100644
--- a/src/exchange/taler-exchange-closer.c
+++ b/src/exchange/taler-exchange-closer.c
@@ -294,10 +294,6 @@ expired_reserve_cb (void *cls,
GNUNET_SCHEDULER_shutdown ();
return GNUNET_DB_STATUS_HARD_ERROR;
}
- if ( (0 == amount_without_fee.value) &&
- (0 == amount_without_fee.fraction) )
- ret = GNUNET_NO;
-
/* NOTE: sizeof (*reserve_pub) == sizeof (wtid) right now, but to
be future-compatible, we use the memset + min construction */
memset (&wtid,
@@ -307,7 +303,7 @@ expired_reserve_cb (void *cls,
reserve_pub,
GNUNET_MIN (sizeof (wtid),
sizeof (*reserve_pub)));
- if (GNUNET_SYSERR != ret)
+ if (TALER_AAR_INVALID_NEGATIVE_RESULT != ret)
qs = db_plugin->insert_reserve_closed (db_plugin->cls,
reserve_pub,
now,
@@ -321,10 +317,10 @@ expired_reserve_cb (void *cls,
"Closing reserve %s over %s (%d, %d)\n",
TALER_B2S (reserve_pub),
TALER_amount2s (left),
- ret,
+ (int) ret,
qs);
/* Check for hard failure */
- if ( (GNUNET_SYSERR == ret) ||
+ if ( (TALER_AAR_INVALID_NEGATIVE_RESULT == ret) ||
(GNUNET_DB_STATUS_HARD_ERROR == qs) )
{
GNUNET_break (0);
@@ -332,10 +328,10 @@ expired_reserve_cb (void *cls,
GNUNET_SCHEDULER_shutdown ();
return GNUNET_DB_STATUS_HARD_ERROR;
}
- if ( (GNUNET_OK != ret) ||
+ if ( (TALER_AAR_RESULT_ZERO == ret) ||
(GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs) )
{
- /* Reserve balance was almost zero OR soft error */
+ /* Reserve balance was zero OR soft error */
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Reserve was virtually empty, moving on\n");
(void) commit_or_warn ();
diff --git a/src/exchange/taler-exchange-httpd_auditors.c b/src/exchange/taler-exchange-httpd_auditors.c
index 34e640ad7..bf4a9b2c0 100644
--- a/src/exchange/taler-exchange-httpd_auditors.c
+++ b/src/exchange/taler-exchange-httpd_auditors.c
@@ -45,7 +45,7 @@ struct AddAuditorDenomContext
/**
* Denomination this is about.
*/
- const struct GNUNET_HashCode *h_denom_pub;
+ const struct TALER_DenominationHash *h_denom_pub;
/**
* Auditor this is about.
@@ -101,7 +101,7 @@ add_auditor_denom_sig (void *cls,
connection,
MHD_HTTP_NOT_FOUND,
TALER_EC_EXCHANGE_GENERIC_DENOMINATION_KEY_UNKNOWN,
- GNUNET_h2s (awc->h_denom_pub));
+ GNUNET_h2s (&awc->h_denom_pub->hash));
return GNUNET_DB_STATUS_HARD_ERROR;
}
@@ -192,7 +192,7 @@ MHD_RESULT
TEH_handler_auditors (
struct MHD_Connection *connection,
const struct TALER_AuditorPublicKeyP *auditor_pub,
- const struct GNUNET_HashCode *h_denom_pub,
+ const struct TALER_DenominationHash *h_denom_pub,
const json_t *root)
{
struct AddAuditorDenomContext awc = {
diff --git a/src/exchange/taler-exchange-httpd_auditors.h b/src/exchange/taler-exchange-httpd_auditors.h
index f8191f8a2..00a2e57a9 100644
--- a/src/exchange/taler-exchange-httpd_auditors.h
+++ b/src/exchange/taler-exchange-httpd_auditors.h
@@ -39,7 +39,7 @@ MHD_RESULT
TEH_handler_auditors (
struct MHD_Connection *connection,
const struct TALER_AuditorPublicKeyP *auditor_pub,
- const struct GNUNET_HashCode *h_denom_pub,
+ const struct TALER_DenominationHash *h_denom_pub,
const json_t *root);
diff --git a/src/exchange/taler-exchange-httpd_deposits_get.c b/src/exchange/taler-exchange-httpd_deposits_get.c
index 2423cc967..d981a8dd9 100644
--- a/src/exchange/taler-exchange-httpd_deposits_get.c
+++ b/src/exchange/taler-exchange-httpd_deposits_get.c
@@ -47,8 +47,8 @@
*/
static MHD_RESULT
reply_deposit_details (struct MHD_Connection *connection,
- const struct GNUNET_HashCode *h_contract_terms,
- const struct GNUNET_HashCode *h_wire,
+ const struct TALER_PrivateContractHash *h_contract_terms,
+ const struct TALER_MerchantWireHash *h_wire,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct TALER_Amount *coin_contribution,
const struct TALER_WireTransferIdentifierRawP *wtid,
diff --git a/src/util/offline_signatures.c b/src/util/offline_signatures.c
index 58617e605..fe502c659 100644
--- a/src/util/offline_signatures.c
+++ b/src/util/offline_signatures.c
@@ -353,8 +353,8 @@ TALER_exchange_offline_wire_add_sign (
GNUNET_assert (GNUNET_OK ==
GNUNET_TIME_round_abs (&now));
- TALER_exchange_wire_signature_hash (payto_uri,
- &kv.h_payto);
+ TALER_payto_hash (payto_uri,
+ &kv.h_payto);
GNUNET_CRYPTO_eddsa_sign (&master_priv->eddsa_priv,
&kv,
&master_sig->eddsa_signature);
@@ -374,8 +374,8 @@ TALER_exchange_offline_wire_add_verify (
.start_date = GNUNET_TIME_absolute_hton (sign_time),
};
- TALER_exchange_wire_signature_hash (payto_uri,
- &aw.h_payto);
+ TALER_payto_hash (payto_uri,
+ &aw.h_payto);
return
GNUNET_CRYPTO_eddsa_verify (
TALER_SIGNATURE_MASTER_ADD_WIRE,
@@ -400,8 +400,8 @@ TALER_exchange_offline_wire_del_sign (
GNUNET_assert (GNUNET_OK ==
GNUNET_TIME_round_abs (&now));
- TALER_exchange_wire_signature_hash (payto_uri,
- &kv.h_payto);
+ TALER_payto_hash (payto_uri,
+ &kv.h_payto);
GNUNET_CRYPTO_eddsa_sign (&master_priv->eddsa_priv,
&kv,
&master_sig->eddsa_signature);
@@ -422,8 +422,8 @@ TALER_exchange_offline_wire_del_verify (
.end_date = GNUNET_TIME_absolute_hton (sign_time),
};
- TALER_exchange_wire_signature_hash (payto_uri,
- &aw.h_payto);
+ TALER_payto_hash (payto_uri,
+ &aw.h_payto);
return GNUNET_CRYPTO_eddsa_verify (
TALER_SIGNATURE_MASTER_DEL_WIRE,
&aw,