diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-10-28 00:01:13 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-10-28 00:01:13 +0200 |
commit | ca71aefbb1e1520b0e4b357c0b1d9c6aaf0d5128 (patch) | |
tree | ee96c78ce1c3648405a4b12b7195b49827e59699 /src/backenddb | |
parent | 99e7729ede69e218198a8c846e8096ad83127f6b (diff) |
-work on fixing FTBFS
Diffstat (limited to 'src/backenddb')
-rw-r--r-- | src/backenddb/plugin_merchantdb_postgres.c | 77 |
1 files changed, 41 insertions, 36 deletions
diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c index 4b90674e..ffd8fd71 100644 --- a/src/backenddb/plugin_merchantdb_postgres.c +++ b/src/backenddb/plugin_merchantdb_postgres.c @@ -838,7 +838,7 @@ struct KycStatusContext /** * Filter, NULL to not filter. */ - const struct GNUNET_HashCode *h_wire; + const struct TALER_MerchantWireHash *h_wire; /** * Filter, NULL to not filter. @@ -874,7 +874,7 @@ kyc_status_cb (void *cls, for (unsigned int i = 0; i < num_results; i++) { - struct GNUNET_HashCode h_wire; + struct TALER_MerchantWireHash h_wire; uint64_t kyc_serial; char *exchange_url; char *payto_uri; @@ -948,7 +948,7 @@ kyc_status_cb (void *cls, static enum GNUNET_DB_QueryStatus postgres_account_kyc_get_status (void *cls, const char *merchant_id, - const struct GNUNET_HashCode *h_wire, + const struct TALER_MerchantWireHash *h_wire, const char *exchange_url, TALER_MERCHANTDB_KycCallback kyc_cb, void *kyc_cb_cls) @@ -1001,7 +1001,7 @@ static enum GNUNET_DB_QueryStatus postgres_account_kyc_set_status ( void *cls, const char *merchant_id, - const struct GNUNET_HashCode *h_wire, + const struct TALER_MerchantWireHash *h_wire, const char *exchange_url, uint64_t exchange_kyc_serial, const struct TALER_ExchangeSignatureP *exchange_sig, @@ -1160,7 +1160,7 @@ postgres_update_instance_auth ( static enum GNUNET_DB_QueryStatus postgres_inactivate_account (void *cls, const char *merchant_id, - const struct GNUNET_HashCode *h_wire) + const struct TALER_MerchantWireHash *h_wire) { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { @@ -1187,7 +1187,7 @@ postgres_inactivate_account (void *cls, static enum GNUNET_DB_QueryStatus postgres_activate_account (void *cls, const char *merchant_id, - const struct GNUNET_HashCode *h_wire) + const struct TALER_MerchantWireHash *h_wire) { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { @@ -2042,7 +2042,7 @@ postgres_insert_contract_terms (void *cls, struct GNUNET_TIME_Absolute pay_deadline; struct GNUNET_TIME_Absolute refund_deadline; const char *fulfillment_url; - struct GNUNET_HashCode h_contract_terms; + struct TALER_PrivateContractHash h_contract_terms; if (GNUNET_OK != TALER_JSON_contract_hash (contract_terms, @@ -2122,7 +2122,7 @@ postgres_update_contract_terms (void *cls, struct GNUNET_TIME_Absolute pay_deadline; struct GNUNET_TIME_Absolute refund_deadline; const char *fulfillment_url = NULL; - struct GNUNET_HashCode h_contract_terms; + struct TALER_PrivateContractHash h_contract_terms; if (GNUNET_OK != TALER_JSON_contract_hash (contract_terms, @@ -2316,7 +2316,8 @@ lookup_deposits_cb (void *cls, static enum GNUNET_DB_QueryStatus postgres_lookup_deposits (void *cls, const char *instance_id, - const struct GNUNET_HashCode *h_contract_terms, + const struct + TALER_PrivateContractHash *h_contract_terms, TALER_MERCHANTDB_DepositsCallback cb, void *cb_cls) { @@ -2336,7 +2337,7 @@ postgres_lookup_deposits (void *cls, /* no preflight check here, run in its own transaction by the caller! */ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Finding deposits for h_contract_terms '%s'\n", - GNUNET_h2s (h_contract_terms)); + GNUNET_h2s (&h_contract_terms->hash)); check_connection (pg); qs = GNUNET_PQ_eval_prepared_multi_select (pg->conn, "lookup_deposits", @@ -2409,19 +2410,20 @@ postgres_insert_exchange_signkey ( * @return transaction status */ static enum GNUNET_DB_QueryStatus -postgres_insert_deposit (void *cls, - const char *instance_id, - struct GNUNET_TIME_Absolute deposit_timestamp, - const struct GNUNET_HashCode *h_contract_terms, - const struct TALER_CoinSpendPublicKeyP *coin_pub, - const char *exchange_url, - const struct TALER_Amount *amount_with_fee, - const struct TALER_Amount *deposit_fee, - const struct TALER_Amount *refund_fee, - const struct TALER_Amount *wire_fee, - const struct GNUNET_HashCode *h_wire, - const struct TALER_ExchangeSignatureP *exchange_sig, - const struct TALER_ExchangePublicKeyP *exchange_pub) +postgres_insert_deposit ( + void *cls, + const char *instance_id, + struct GNUNET_TIME_Absolute deposit_timestamp, + const struct TALER_PrivateContractHash *h_contract_terms, + const struct TALER_CoinSpendPublicKeyP *coin_pub, + const char *exchange_url, + const struct TALER_Amount *amount_with_fee, + const struct TALER_Amount *deposit_fee, + const struct TALER_Amount *refund_fee, + const struct TALER_Amount *wire_fee, + const struct TALER_MerchantWireHash *h_wire, + const struct TALER_ExchangeSignatureP *exchange_sig, + const struct TALER_ExchangePublicKeyP *exchange_pub) { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { @@ -2444,7 +2446,7 @@ postgres_insert_deposit (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Storing deposit for instance `%s' h_contract_terms `%s', coin_pub: `%s', amount_with_fee: %s\n", instance_id, - GNUNET_h2s (h_contract_terms), + GNUNET_h2s (&h_contract_terms->hash), TALER_B2S (coin_pub), TALER_amount2s (amount_with_fee)); check_connection (pg); @@ -2541,7 +2543,8 @@ lookup_refunds_cb (void *cls, static enum GNUNET_DB_QueryStatus postgres_lookup_refunds (void *cls, const char *instance_id, - const struct GNUNET_HashCode *h_contract_terms, + const struct + TALER_PrivateContractHash *h_contract_terms, TALER_MERCHANTDB_RefundCallback rc, void *rc_cls) { @@ -2560,7 +2563,7 @@ postgres_lookup_refunds (void *cls, /* no preflight check here, run in transaction by caller! */ TALER_LOG_DEBUG ("Looking for refund of h_contract_terms %s at `%s'\n", - GNUNET_h2s (h_contract_terms), + GNUNET_h2s (&h_contract_terms->hash), instance_id); check_connection (pg); qs = GNUNET_PQ_eval_prepared_multi_select (pg->conn, @@ -2588,7 +2591,8 @@ postgres_lookup_refunds (void *cls, static enum GNUNET_DB_QueryStatus postgres_mark_contract_paid (void *cls, const char *instance_id, - const struct GNUNET_HashCode *h_contract_terms, + const struct + TALER_PrivateContractHash *h_contract_terms, const char *session_id) { struct PostgresClosure *pg = cls; @@ -2611,7 +2615,7 @@ postgres_mark_contract_paid (void *cls, /* no preflight check here, run in transaction by caller! */ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Marking h_contract_terms '%s' of %s as paid for session `%s'\n", - GNUNET_h2s (h_contract_terms), + GNUNET_h2s (&h_contract_terms->hash), instance_id, session_id); qs = GNUNET_PQ_eval_prepared_non_select (pg->conn, @@ -2649,7 +2653,7 @@ postgres_mark_contract_paid (void *cls, static enum GNUNET_DB_QueryStatus postgres_refund_coin (void *cls, const char *instance_id, - const struct GNUNET_HashCode *h_contract_terms, + const struct TALER_PrivateContractHash *h_contract_terms, struct GNUNET_TIME_Absolute refund_timestamp, const struct TALER_CoinSpendPublicKeyP *coin_pub, const char *reason) @@ -2684,7 +2688,7 @@ static enum GNUNET_DB_QueryStatus postgres_lookup_order_status (void *cls, const char *instance_id, const char *order_id, - struct GNUNET_HashCode *h_contract_terms, + struct TALER_PrivateContractHash *h_contract_terms, bool *paid) { struct PostgresClosure *pg = cls; @@ -2732,7 +2736,8 @@ postgres_lookup_order_status_by_serial (void *cls, const char *instance_id, uint64_t order_serial, char **order_id, - struct GNUNET_HashCode *h_contract_terms, + struct TALER_PrivateContractHash * + h_contract_terms, bool *paid) { struct PostgresClosure *pg = cls; @@ -2882,7 +2887,7 @@ lookup_deposits_by_order_cb (void *cls, { uint64_t deposit_serial; char *exchange_url; - struct GNUNET_HashCode h_wire; + struct TALER_MerchantWireHash h_wire; struct TALER_CoinSpendPublicKeyP coin_pub; struct TALER_Amount amount_with_fee; struct TALER_Amount deposit_fee; @@ -3708,7 +3713,7 @@ static enum GNUNET_DB_QueryStatus postgres_lookup_refunds_detailed ( void *cls, const char *instance_id, - const struct GNUNET_HashCode *h_contract_terms, + const struct TALER_PrivateContractHash *h_contract_terms, TALER_MERCHANTDB_RefundDetailCallback rc, void *rc_cls) { @@ -3727,7 +3732,7 @@ postgres_lookup_refunds_detailed ( /* no preflight check here, run in transaction by caller! */ TALER_LOG_DEBUG ("Looking for refund %s + %s\n", - GNUNET_h2s (h_contract_terms), + GNUNET_h2s (&h_contract_terms->hash), instance_id); check_connection (pg); qs = GNUNET_PQ_eval_prepared_multi_select (pg->conn, @@ -4296,7 +4301,7 @@ lookup_deposits_by_contract_and_coin_cb (void *cls, struct TALER_Amount deposit_fee; struct TALER_Amount refund_fee; struct TALER_Amount wire_fee; - struct GNUNET_HashCode h_wire; + struct TALER_MerchantWireHash h_wire; struct GNUNET_TIME_Absolute deposit_timestamp; struct GNUNET_TIME_Absolute refund_deadline; struct TALER_ExchangeSignatureP exchange_sig; @@ -4367,7 +4372,7 @@ static enum GNUNET_DB_QueryStatus postgres_lookup_deposits_by_contract_and_coin ( void *cls, const char *instance_id, - const struct GNUNET_HashCode *h_contract_terms, + const struct TALER_PrivateContractHash *h_contract_terms, const struct TALER_CoinSpendPublicKeyP *coin_pub, TALER_MERCHANTDB_CoinDepositCallback cb, void *cb_cls) |