summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2023-12-25 02:12:45 +0800
committerChristian Grothoff <grothoff@gnunet.org>2023-12-25 02:12:45 +0800
commitfba64a564e04aa4897120c9444e8cb4f8f54ab68 (patch)
treec715990d204764a882e3b5a231c38a6ffc5b0569 /src
parent3eebc4b18ae109ea54e5f8788ac29453f74282ac (diff)
downloadexchange-fba64a564e04aa4897120c9444e8cb4f8f54ab68.tar.gz
exchange-fba64a564e04aa4897120c9444e8cb4f8f54ab68.tar.bz2
exchange-fba64a564e04aa4897120c9444e8cb4f8f54ab68.zip
fix #8015 (allow purse merge until they were actually expired/refunded)
Diffstat (limited to 'src')
-rw-r--r--src/exchange/exchange.conf2
-rw-r--r--src/exchange/taler-exchange-httpd_purses_merge.c96
-rw-r--r--src/exchange/taler-exchange-httpd_reserves_purse.c16
-rw-r--r--src/exchangedb/pg_select_purse_merge.c11
-rw-r--r--src/exchangedb/pg_select_purse_merge.h4
-rw-r--r--src/include/taler_exchangedb_plugin.h790
6 files changed, 460 insertions, 459 deletions
diff --git a/src/exchange/exchange.conf b/src/exchange/exchange.conf
index 40eeb5e13..ce471a292 100644
--- a/src/exchange/exchange.conf
+++ b/src/exchange/exchange.conf
@@ -85,7 +85,7 @@ ROUTER_IDLE_SLEEP_INTERVAL = 60 s
# by taler-exchange-expire (in time). It may take
# this much time for an expired purse to be really
# cleaned up and the coins refunded.
-EXPIRE_SHARD_SIZE = 1 h
+EXPIRE_SHARD_SIZE = 60 s
# How long should the transfer tool
# sleep if it has nothing to do?
diff --git a/src/exchange/taler-exchange-httpd_purses_merge.c b/src/exchange/taler-exchange-httpd_purses_merge.c
index 5b66254f5..fb5ce4d90 100644
--- a/src/exchange/taler-exchange-httpd_purses_merge.c
+++ b/src/exchange/taler-exchange-httpd_purses_merge.c
@@ -370,13 +370,15 @@ merge_transaction (void *cls,
struct GNUNET_TIME_Timestamp merge_timestamp;
char *partner_url = NULL;
struct TALER_ReservePublicKeyP reserve_pub;
+ bool refunded;
qs = TEH_plugin->select_purse_merge (TEH_plugin->cls,
pcc->purse_pub,
&merge_sig,
&merge_timestamp,
&partner_url,
- &reserve_pub);
+ &reserve_pub,
+ &refunded);
if (qs <= 0)
{
if (GNUNET_DB_STATUS_SOFT_ERROR == qs)
@@ -390,18 +392,39 @@ merge_transaction (void *cls,
"select purse merge");
return qs;
}
- *mhd_ret = TALER_MHD_REPLY_JSON_PACK (
- connection,
- MHD_HTTP_CONFLICT,
- GNUNET_JSON_pack_timestamp ("merge_timestamp",
- merge_timestamp),
- GNUNET_JSON_pack_data_auto ("merge_sig",
- &merge_sig),
- GNUNET_JSON_pack_allow_null (
- GNUNET_JSON_pack_string ("partner_url",
- partner_url)),
- GNUNET_JSON_pack_data_auto ("reserve_pub",
- &reserve_pub));
+ if (refunded)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Purse was already refunded\n");
+ *mhd_ret = TALER_MHD_reply_with_error (connection,
+ MHD_HTTP_GONE,
+ TALER_EC_EXCHANGE_GENERIC_PURSE_EXPIRED,
+ NULL);
+ GNUNET_free (partner_url);
+ return GNUNET_DB_STATUS_HARD_ERROR;
+ }
+ if (0 !=
+ GNUNET_memcmp (&merge_sig,
+ &pcc->merge_sig))
+ {
+ *mhd_ret = TALER_MHD_REPLY_JSON_PACK (
+ connection,
+ MHD_HTTP_CONFLICT,
+ GNUNET_JSON_pack_timestamp ("merge_timestamp",
+ merge_timestamp),
+ GNUNET_JSON_pack_data_auto ("merge_sig",
+ &merge_sig),
+ GNUNET_JSON_pack_allow_null (
+ GNUNET_JSON_pack_string ("partner_url",
+ partner_url)),
+ GNUNET_JSON_pack_data_auto ("reserve_pub",
+ &reserve_pub));
+ GNUNET_free (partner_url);
+ return GNUNET_DB_STATUS_HARD_ERROR;
+ }
+ /* idempotent! */
+ *mhd_ret = reply_merge_success (connection,
+ pcc);
GNUNET_free (partner_url);
return GNUNET_DB_STATUS_HARD_ERROR;
}
@@ -625,53 +648,6 @@ TEH_handler_purses_merge (
}
}
- if (GNUNET_TIME_absolute_is_past (pcc.purse_expiration.abs_time))
- {
- struct TALER_PurseMergeSignatureP merge_sig;
- struct GNUNET_TIME_Timestamp merge_timestamp;
- char *partner_url = NULL;
- struct TALER_ReservePublicKeyP reserve_pub;
-
- qs = TEH_plugin->select_purse_merge (TEH_plugin->cls,
- pcc.purse_pub,
- &merge_sig,
- &merge_timestamp,
- &partner_url,
- &reserve_pub);
- if (qs <= 0)
- {
- return TALER_MHD_reply_with_error (connection,
- MHD_HTTP_GONE,
- TALER_EC_EXCHANGE_GENERIC_PURSE_EXPIRED,
- NULL);
- }
- if (0 !=
- GNUNET_memcmp (&merge_sig,
- &pcc.merge_sig))
- {
- MHD_RESULT mhd_res;
-
- mhd_res = TALER_MHD_REPLY_JSON_PACK (
- connection,
- MHD_HTTP_CONFLICT,
- GNUNET_JSON_pack_timestamp ("merge_timestamp",
- merge_timestamp),
- GNUNET_JSON_pack_data_auto ("merge_sig",
- &merge_sig),
- GNUNET_JSON_pack_allow_null (
- GNUNET_JSON_pack_string ("partner_url",
- partner_url)),
- GNUNET_JSON_pack_data_auto ("reserve_pub",
- &reserve_pub));
- GNUNET_free (partner_url);
- return mhd_res;
- }
- GNUNET_free (partner_url);
- /* request was idempotent, return success! */
- return reply_merge_success (connection,
- &pcc);
- }
-
/* execute transaction */
{
MHD_RESULT mhd_ret;
diff --git a/src/exchange/taler-exchange-httpd_reserves_purse.c b/src/exchange/taler-exchange-httpd_reserves_purse.c
index 71cec6941..5e06db206 100644
--- a/src/exchange/taler-exchange-httpd_reserves_purse.c
+++ b/src/exchange/taler-exchange-httpd_reserves_purse.c
@@ -363,6 +363,7 @@ purse_transaction (void *cls,
struct GNUNET_TIME_Timestamp merge_timestamp;
char *partner_url;
struct TALER_ReservePublicKeyP reserve_pub;
+ bool refunded;
TEH_plugin->rollback (TEH_plugin->cls);
qs = TEH_plugin->select_purse_merge (
@@ -371,7 +372,8 @@ purse_transaction (void *cls,
&merge_sig,
&merge_timestamp,
&partner_url,
- &reserve_pub);
+ &reserve_pub,
+ &refunded);
if (qs <= 0)
{
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR != qs);
@@ -384,6 +386,18 @@ purse_transaction (void *cls,
"select purse merge");
return GNUNET_DB_STATUS_HARD_ERROR;
}
+ if (refunded)
+ {
+ /* This is a bit of a strange case ... */
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Purse was already refunded\n");
+ *mhd_ret = TALER_MHD_reply_with_error (connection,
+ MHD_HTTP_GONE,
+ TALER_EC_EXCHANGE_GENERIC_PURSE_EXPIRED,
+ NULL);
+ GNUNET_free (partner_url);
+ return GNUNET_DB_STATUS_HARD_ERROR;
+ }
*mhd_ret
= TALER_MHD_REPLY_JSON_PACK (
connection,
diff --git a/src/exchangedb/pg_select_purse_merge.c b/src/exchangedb/pg_select_purse_merge.c
index ce9f03618..d58e8892f 100644
--- a/src/exchangedb/pg_select_purse_merge.c
+++ b/src/exchangedb/pg_select_purse_merge.c
@@ -33,7 +33,8 @@ TEH_PG_select_purse_merge (
struct TALER_PurseMergeSignatureP *merge_sig,
struct GNUNET_TIME_Timestamp *merge_timestamp,
char **partner_url,
- struct TALER_ReservePublicKeyP *reserve_pub)
+ struct TALER_ReservePublicKeyP *reserve_pub,
+ bool *refunded)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
@@ -52,11 +53,15 @@ TEH_PG_select_purse_merge (
GNUNET_PQ_result_spec_string ("partner_base_url",
partner_url),
&is_null),
+ GNUNET_PQ_result_spec_allow_null (
+ GNUNET_PQ_result_spec_bool ("refunded",
+ refunded),
+ NULL),
GNUNET_PQ_result_spec_end
};
*partner_url = NULL;
- /* Used in #postgres_select_purse_merge */
+ *refunded = true;
PREPARE (pg,
"select_purse_merge",
"SELECT "
@@ -64,7 +69,9 @@ TEH_PG_select_purse_merge (
",merge_sig"
",merge_timestamp"
",partner_base_url"
+ ",refunded"
" FROM purse_merges"
+ " LEFT JOIN purse_decision USING (purse_pub)"
" LEFT JOIN partners USING (partner_serial_id)"
" WHERE purse_pub=$1;");
return GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
diff --git a/src/exchangedb/pg_select_purse_merge.h b/src/exchangedb/pg_select_purse_merge.h
index 982225123..8054974aa 100644
--- a/src/exchangedb/pg_select_purse_merge.h
+++ b/src/exchangedb/pg_select_purse_merge.h
@@ -35,6 +35,7 @@
* @param[out] merge_timestamp set to the time of the merge
* @param[out] partner_url set to the URL of the target exchange, or NULL if the target exchange is us. To be freed by the caller.
* @param[out] reserve_pub set to the public key of the reserve/account being credited
+ * @param[out] refunded set to true if purse was refunded
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
@@ -44,6 +45,7 @@ TEH_PG_select_purse_merge (
struct TALER_PurseMergeSignatureP *merge_sig,
struct GNUNET_TIME_Timestamp *merge_timestamp,
char **partner_url,
- struct TALER_ReservePublicKeyP *reserve_pub);
+ struct TALER_ReservePublicKeyP *reserve_pub,
+ bool *refunded);
#endif
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index 278114c72..3fe2efd1a 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -3556,7 +3556,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure
*/
enum GNUNET_GenericReturnValue
- (*drop_tables)(void *cls);
+ (*drop_tables)(void *cls);
/**
* Create the necessary tables if they are not present
@@ -3569,9 +3569,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure
*/
enum GNUNET_GenericReturnValue
- (*create_tables)(void *cls,
- bool support_partitions,
- uint32_t num_partitions);
+ (*create_tables)(void *cls,
+ bool support_partitions,
+ uint32_t num_partitions);
/**
@@ -3583,8 +3583,8 @@ struct TALER_EXCHANGEDB_Plugin
* @return #GNUNET_OK on success
*/
enum GNUNET_GenericReturnValue
- (*start)(void *cls,
- const char *name);
+ (*start)(void *cls,
+ const char *name);
/**
@@ -3596,8 +3596,8 @@ struct TALER_EXCHANGEDB_Plugin
* @return #GNUNET_OK on success
*/
enum GNUNET_GenericReturnValue
- (*start_read_committed)(void *cls,
- const char *name);
+ (*start_read_committed)(void *cls,
+ const char *name);
/**
* Start a READ ONLY serializable transaction.
@@ -3608,8 +3608,8 @@ struct TALER_EXCHANGEDB_Plugin
* @return #GNUNET_OK on success
*/
enum GNUNET_GenericReturnValue
- (*start_read_only)(void *cls,
- const char *name);
+ (*start_read_only)(void *cls,
+ const char *name);
/**
@@ -3619,7 +3619,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*commit)(void *cls);
+ (*commit)(void *cls);
/**
@@ -3633,7 +3633,7 @@ struct TALER_EXCHANGEDB_Plugin
* #GNUNET_SYSERR on hard errors
*/
enum GNUNET_GenericReturnValue
- (*preflight)(void *cls);
+ (*preflight)(void *cls);
/**
@@ -3700,7 +3700,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return status of the query
*/
enum GNUNET_DB_QueryStatus
- (*insert_denomination_info)(
+ (*insert_denomination_info)(
void *cls,
const struct TALER_DenominationPublicKey *denom_pub,
const struct TALER_EXCHANGEDB_DenominationKeyInformation *issue);
@@ -3715,7 +3715,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_denomination_info)(
+ (*get_denomination_info)(
void *cls,
const struct TALER_DenominationHashP *denom_pub_hash,
struct TALER_EXCHANGEDB_DenominationKeyInformation *issue);
@@ -3733,9 +3733,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*iterate_denomination_info)(void *cls,
- TALER_EXCHANGEDB_DenominationCallback cb,
- void *cb_cls);
+ (*iterate_denomination_info)(void *cls,
+ TALER_EXCHANGEDB_DenominationCallback cb,
+ void *cb_cls);
/**
@@ -3749,9 +3749,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*iterate_denominations)(void *cls,
- TALER_EXCHANGEDB_DenominationsCallback cb,
- void *cb_cls);
+ (*iterate_denominations)(void *cls,
+ TALER_EXCHANGEDB_DenominationsCallback cb,
+ void *cb_cls);
/**
* Function called to invoke @a cb on every non-revoked exchange signing key
@@ -3764,9 +3764,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*iterate_active_signkeys)(void *cls,
- TALER_EXCHANGEDB_ActiveSignkeysCallback cb,
- void *cb_cls);
+ (*iterate_active_signkeys)(void *cls,
+ TALER_EXCHANGEDB_ActiveSignkeysCallback cb,
+ void *cb_cls);
/**
@@ -3779,9 +3779,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*iterate_active_auditors)(void *cls,
- TALER_EXCHANGEDB_AuditorsCallback cb,
- void *cb_cls);
+ (*iterate_active_auditors)(void *cls,
+ TALER_EXCHANGEDB_AuditorsCallback cb,
+ void *cb_cls);
/**
@@ -3795,7 +3795,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*iterate_auditor_denominations)(
+ (*iterate_auditor_denominations)(
void *cls,
TALER_EXCHANGEDB_AuditorDenominationsCallback cb,
void *cb_cls);
@@ -3811,8 +3811,8 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*reserves_get)(void *cls,
- struct TALER_EXCHANGEDB_Reserve *reserve);
+ (*reserves_get)(void *cls,
+ struct TALER_EXCHANGEDB_Reserve *reserve);
/**
@@ -3824,7 +3824,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*reserves_get_origin)(
+ (*reserves_get_origin)(
void *cls,
const struct TALER_ReservePublicKeyP *reserve_pub,
struct TALER_PaytoHashP *h_payto);
@@ -3839,9 +3839,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*drain_kyc_alert)(void *cls,
- uint32_t trigger_type,
- struct TALER_PaytoHashP *h_payto);
+ (*drain_kyc_alert)(void *cls,
+ uint32_t trigger_type,
+ struct TALER_PaytoHashP *h_payto);
/**
@@ -3855,7 +3855,7 @@ struct TALER_EXCHANGEDB_Plugin
* set to the status of the
*/
enum GNUNET_DB_QueryStatus
- (*reserves_in_insert)(
+ (*reserves_in_insert)(
void *cls,
const struct TALER_EXCHANGEDB_ReserveInInfo *reserves,
unsigned int reserves_length,
@@ -3872,10 +3872,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return statement execution status
*/
enum GNUNET_DB_QueryStatus
- (*lock_nonce)(void *cls,
- const struct GNUNET_CRYPTO_CsSessionNonce *nonce,
- const struct TALER_DenominationHashP *denom_pub_hash,
- const union TALER_EXCHANGEDB_NonceLockTargetP *target);
+ (*lock_nonce)(void *cls,
+ const struct GNUNET_CRYPTO_CsSessionNonce *nonce,
+ const struct TALER_DenominationHashP *denom_pub_hash,
+ const union TALER_EXCHANGEDB_NonceLockTargetP *target);
/**
@@ -3890,10 +3890,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return statement execution status
*/
enum GNUNET_DB_QueryStatus
- (*get_withdraw_info)(void *cls,
- const struct TALER_BlindedCoinHashP *bch,
- struct TALER_EXCHANGEDB_CollectableBlindcoin *
- collectable);
+ (*get_withdraw_info)(void *cls,
+ const struct TALER_BlindedCoinHashP *bch,
+ struct TALER_EXCHANGEDB_CollectableBlindcoin *
+ collectable);
/**
@@ -3924,7 +3924,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*do_batch_withdraw)(
+ (*do_batch_withdraw)(
void *cls,
struct GNUNET_TIME_Timestamp now,
const struct TALER_ReservePublicKeyP *reserve_pub,
@@ -3953,7 +3953,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*do_batch_withdraw_insert)(
+ (*do_batch_withdraw_insert)(
void *cls,
const union GNUNET_CRYPTO_BlindSessionNonce *nonce,
const struct TALER_EXCHANGEDB_CollectableBlindcoin *collectable,
@@ -3975,7 +3975,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return statement execution status
*/
enum GNUNET_DB_QueryStatus
- (*get_age_withdraw)(
+ (*get_age_withdraw)(
void *cls,
const struct TALER_ReservePublicKeyP *reserve_pub,
const struct TALER_AgeWithdrawCommitmentHashP *ach,
@@ -3997,7 +3997,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*do_age_withdraw)(
+ (*do_age_withdraw)(
void *cls,
const struct TALER_EXCHANGEDB_AgeWithdraw *commitment,
struct GNUNET_TIME_Timestamp now,
@@ -4018,7 +4018,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*get_policy_details)(
+ (*get_policy_details)(
void *cls,
const struct GNUNET_HashCode *hc,
struct TALER_PolicyDetails *detail);
@@ -4036,7 +4036,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*persist_policy_details)(
+ (*persist_policy_details)(
void *cls,
const struct TALER_PolicyDetails *details,
uint64_t *policy_details_serial_id,
@@ -4058,7 +4058,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*do_deposit)(
+ (*do_deposit)(
void *cls,
const struct TALER_EXCHANGEDB_BatchDeposit *bd,
struct GNUNET_TIME_Timestamp *exchange_timestamp,
@@ -4081,7 +4081,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*do_melt)(
+ (*do_melt)(
void *cls,
const struct TALER_RefreshMasterSecretP *rms,
struct TALER_EXCHANGEDB_Refresh *refresh,
@@ -4098,7 +4098,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*add_policy_fulfillment_proof)(
+ (*add_policy_fulfillment_proof)(
void *cls,
struct TALER_PolicyFulfillmentTransactionData *fulfillment);
@@ -4117,7 +4117,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*cs_refreshes_reveal)(
+ (*cs_refreshes_reveal)(
void *cls,
const struct GNUNET_CRYPTO_CsSessionNonce *nonce,
const struct TALER_CoinSpendPublicKeyP *old_coin_pub,
@@ -4140,7 +4140,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*do_refund)(
+ (*do_refund)(
void *cls,
const struct TALER_EXCHANGEDB_Refund *refund,
const struct TALER_Amount *deposit_fee,
@@ -4168,7 +4168,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*do_recoup)(
+ (*do_recoup)(
void *cls,
const struct TALER_ReservePublicKeyP *reserve_pub,
uint64_t reserve_out_serial_id,
@@ -4198,7 +4198,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*do_recoup_refresh)(
+ (*do_recoup_refresh)(
void *cls,
const struct TALER_CoinSpendPublicKeyP *old_coin_pub,
uint64_t rrc_serial,
@@ -4229,13 +4229,13 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*get_reserve_history)(void *cls,
- const struct TALER_ReservePublicKeyP *reserve_pub,
- uint64_t start_off,
- uint64_t etag_in,
- uint64_t *etag_out,
- struct TALER_Amount *balance,
- struct TALER_EXCHANGEDB_ReserveHistory **rhp);
+ (*get_reserve_history)(void *cls,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ uint64_t start_off,
+ uint64_t etag_in,
+ uint64_t *etag_out,
+ struct TALER_Amount *balance,
+ struct TALER_EXCHANGEDB_ReserveHistory **rhp);
/**
@@ -4247,9 +4247,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*get_reserve_balance)(void *cls,
- const struct TALER_ReservePublicKeyP *reserve_pub,
- struct TALER_Amount *balance);
+ (*get_reserve_balance)(void *cls,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ struct TALER_Amount *balance);
/**
@@ -4346,7 +4346,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status, non-negative on success
*/
enum GNUNET_DB_QueryStatus
- (*batch_ensure_coin_known)(
+ (*batch_ensure_coin_known)(
void *cls,
const struct TALER_CoinPublicInfo *coin,
struct TALER_EXCHANGEDB_CoinInfo *result,
@@ -4363,9 +4363,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status, non-negative on success
*/
enum GNUNET_DB_QueryStatus
- (*get_known_coin)(void *cls,
- const struct TALER_CoinSpendPublicKeyP *coin_pub,
- struct TALER_CoinPublicInfo *coin_info);
+ (*get_known_coin)(void *cls,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ struct TALER_CoinPublicInfo *coin_info);
/**
* Retrieve the signature and corresponding denomination for a given @a coin
@@ -4377,7 +4377,7 @@ struct TALER_EXCHANGEDB_Plugin
* @param[out] denom_sig the signature with the denomination's private key over the coin_pub
*/
enum GNUNET_DB_QueryStatus
- (*get_signature_for_known_coin) (
+ (*get_signature_for_known_coin)(
void *cls,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
struct TALER_DenominationPublicKey *denom_pub,
@@ -4393,10 +4393,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_coin_denomination)(void *cls,
- const struct TALER_CoinSpendPublicKeyP *coin_pub,
- uint64_t *known_coin_id,
- struct TALER_DenominationHashP *denom_hash);
+ (*get_coin_denomination)(void *cls,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ uint64_t *known_coin_id,
+ struct TALER_DenominationHashP *denom_hash);
/**
@@ -4411,7 +4411,7 @@ struct TALER_EXCHANGEDB_Plugin
* @param[out] h_wire hash of the wire details
*/
enum GNUNET_DB_QueryStatus
- (*get_wire_hash_for_contract)(
+ (*get_wire_hash_for_contract)(
void *cls,
const struct TALER_MerchantPublicKeyP *merchant_pub,
const struct TALER_PrivateContractHashP *h_contract_terms,
@@ -4435,7 +4435,7 @@ struct TALER_EXCHANGEDB_Plugin
*/
// FIXME: rename!
enum GNUNET_DB_QueryStatus
- (*have_deposit2)(
+ (*have_deposit2)(
void *cls,
const struct TALER_PrivateContractHashP *h_contract_terms,
const struct TALER_MerchantWireHashP *h_wire,
@@ -4455,8 +4455,8 @@ struct TALER_EXCHANGEDB_Plugin
* @return query result status
*/
enum GNUNET_DB_QueryStatus
- (*insert_refund)(void *cls,
- const struct TALER_EXCHANGEDB_Refund *refund);
+ (*insert_refund)(void *cls,
+ const struct TALER_EXCHANGEDB_Refund *refund);
/**
@@ -4471,14 +4471,14 @@ struct TALER_EXCHANGEDB_Plugin
* @return query result status
*/
enum GNUNET_DB_QueryStatus
- (*select_refunds_by_coin)(void *cls,
- const struct TALER_CoinSpendPublicKeyP *coin_pub,
- const struct
- TALER_MerchantPublicKeyP *merchant_pub,
- const struct
- TALER_PrivateContractHashP *h_contract,
- TALER_EXCHANGEDB_RefundCoinCallback cb,
- void *cb_cls);
+ (*select_refunds_by_coin)(void *cls,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ const struct
+ TALER_MerchantPublicKeyP *merchant_pub,
+ const struct
+ TALER_PrivateContractHashP *h_contract,
+ TALER_EXCHANGEDB_RefundCoinCallback cb,
+ void *cb_cls);
/**
@@ -4495,11 +4495,11 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_ready_deposit)(void *cls,
- uint64_t start_shard_row,
- uint64_t end_shard_row,
- struct TALER_MerchantPublicKeyP *merchant_pub,
- char **payto_uri);
+ (*get_ready_deposit)(void *cls,
+ uint64_t start_shard_row,
+ uint64_t end_shard_row,
+ struct TALER_MerchantPublicKeyP *merchant_pub,
+ char **payto_uri);
/**
@@ -4514,7 +4514,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*aggregate)(
+ (*aggregate)(
void *cls,
const struct TALER_PaytoHashP *h_payto,
const struct TALER_MerchantPublicKeyP *merchant_pub,
@@ -4535,7 +4535,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*create_aggregation_transient)(
+ (*create_aggregation_transient)(
void *cls,
const struct TALER_PaytoHashP *h_payto,
const char *exchange_account_section,
@@ -4557,7 +4557,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*select_aggregation_transient)(
+ (*select_aggregation_transient)(
void *cls,
const struct TALER_PaytoHashP *h_payto,
const struct TALER_MerchantPublicKeyP *merchant_pub,
@@ -4576,7 +4576,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*find_aggregation_transient)(
+ (*find_aggregation_transient)(
void *cls,
const struct TALER_PaytoHashP *h_payto,
TALER_EXCHANGEDB_TransientAggregationCallback cb,
@@ -4595,7 +4595,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*update_aggregation_transient)(
+ (*update_aggregation_transient)(
void *cls,
const struct TALER_PaytoHashP *h_payto,
const struct TALER_WireTransferIdentifierRawP *wtid,
@@ -4613,7 +4613,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*delete_aggregation_transient)(
+ (*delete_aggregation_transient)(
void *cls,
const struct TALER_PaytoHashP *h_payto,
const struct TALER_WireTransferIdentifierRawP *wtid);
@@ -4631,10 +4631,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*get_melt)(void *cls,
- const struct TALER_RefreshCommitmentP *rc,
- struct TALER_EXCHANGEDB_Melt *melt,
- uint64_t *melt_serial_id);
+ (*get_melt)(void *cls,
+ const struct TALER_RefreshCommitmentP *rc,
+ struct TALER_EXCHANGEDB_Melt *melt,
+ uint64_t *melt_serial_id);
/**
@@ -4652,7 +4652,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return query status for the transaction
*/
enum GNUNET_DB_QueryStatus
- (*insert_refresh_reveal)(
+ (*insert_refresh_reveal)(
void *cls,
uint64_t melt_serial_id,
uint32_t num_rrcs,
@@ -4673,10 +4673,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*get_refresh_reveal)(void *cls,
- const struct TALER_RefreshCommitmentP *rc,
- TALER_EXCHANGEDB_RefreshCallback cb,
- void *cb_cls);
+ (*get_refresh_reveal)(void *cls,
+ const struct TALER_RefreshCommitmentP *rc,
+ TALER_EXCHANGEDB_RefreshCallback cb,
+ void *cb_cls);
/**
@@ -4692,10 +4692,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return statement execution status
*/
enum GNUNET_DB_QueryStatus
- (*get_link_data)(void *cls,
- const struct TALER_CoinSpendPublicKeyP *coin_pub,
- TALER_EXCHANGEDB_LinkCallback ldc,
- void *tdc_cls);
+ (*get_link_data)(void *cls,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ TALER_EXCHANGEDB_LinkCallback ldc,
+ void *tdc_cls);
/**
@@ -4719,7 +4719,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*get_coin_transactions)(
+ (*get_coin_transactions)(
void *cls,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
uint64_t start_off,
@@ -4752,10 +4752,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return query status of the transaction
*/
enum GNUNET_DB_QueryStatus
- (*lookup_wire_transfer)(void *cls,
- const struct TALER_WireTransferIdentifierRawP *wtid,
- TALER_EXCHANGEDB_AggregationDataCallback cb,
- void *cb_cls);
+ (*lookup_wire_transfer)(void *cls,
+ const struct TALER_WireTransferIdentifierRawP *wtid,
+ TALER_EXCHANGEDB_AggregationDataCallback cb,
+ void *cb_cls);
/**
@@ -4780,7 +4780,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*lookup_transfer_by_deposit)(
+ (*lookup_transfer_by_deposit)(
void *cls,
const struct TALER_PrivateContractHashP *h_contract_terms,
const struct TALER_MerchantWireHashP *h_wire,
@@ -4807,12 +4807,12 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_wire_fee)(void *cls,
- const char *wire_method,
- struct GNUNET_TIME_Timestamp start_date,
- struct GNUNET_TIME_Timestamp end_date,
- const struct TALER_WireFeeSet *fees,
- const struct TALER_MasterSignatureP *master_sig);
+ (*insert_wire_fee)(void *cls,
+ const char *wire_method,
+ struct GNUNET_TIME_Timestamp start_date,
+ struct GNUNET_TIME_Timestamp end_date,
+ const struct TALER_WireFeeSet *fees,
+ const struct TALER_MasterSignatureP *master_sig);
/**
@@ -4829,15 +4829,15 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_global_fee)(void *cls,
- struct GNUNET_TIME_Timestamp start_date,
- struct GNUNET_TIME_Timestamp end_date,
- const struct TALER_GlobalFeeSet *fees,
- struct GNUNET_TIME_Relative purse_timeout,
- struct GNUNET_TIME_Relative history_expiration,
- uint32_t purse_account_limit,
+ (*insert_global_fee)(void *cls,
+ struct GNUNET_TIME_Timestamp start_date,
+ struct GNUNET_TIME_Timestamp end_date,
+ const struct TALER_GlobalFeeSet *fees,
+ struct GNUNET_TIME_Relative purse_timeout,
+ struct GNUNET_TIME_Relative history_expiration,
+ uint32_t purse_account_limit,
- const struct TALER_MasterSignatureP *master_sig);
+ const struct TALER_MasterSignatureP *master_sig);
/**
@@ -4853,13 +4853,13 @@ struct TALER_EXCHANGEDB_Plugin
* @return query status of the transaction
*/
enum GNUNET_DB_QueryStatus
- (*get_wire_fee)(void *cls,
- const char *type,
- struct GNUNET_TIME_Timestamp date,
- struct GNUNET_TIME_Timestamp *start_date,
- struct GNUNET_TIME_Timestamp *end_date,
- struct TALER_WireFeeSet *fees,
- struct TALER_MasterSignatureP *master_sig);
+ (*get_wire_fee)(void *cls,
+ const char *type,
+ struct GNUNET_TIME_Timestamp date,
+ struct GNUNET_TIME_Timestamp *start_date,
+ struct GNUNET_TIME_Timestamp *end_date,
+ struct TALER_WireFeeSet *fees,
+ struct TALER_MasterSignatureP *master_sig);
/**
@@ -4877,15 +4877,15 @@ struct TALER_EXCHANGEDB_Plugin
* @return query status of the transaction
*/
enum GNUNET_DB_QueryStatus
- (*get_global_fee)(void *cls,
- struct GNUNET_TIME_Timestamp date,
- struct GNUNET_TIME_Timestamp *start_date,
- struct GNUNET_TIME_Timestamp *end_date,
- struct TALER_GlobalFeeSet *fees,
- struct GNUNET_TIME_Relative *purse_timeout,
- struct GNUNET_TIME_Relative *history_expiration,
- uint32_t *purse_account_limit,
- struct TALER_MasterSignatureP *master_sig);
+ (*get_global_fee)(void *cls,
+ struct GNUNET_TIME_Timestamp date,
+ struct GNUNET_TIME_Timestamp *start_date,
+ struct GNUNET_TIME_Timestamp *end_date,
+ struct TALER_GlobalFeeSet *fees,
+ struct GNUNET_TIME_Relative *purse_timeout,
+ struct GNUNET_TIME_Relative *history_expiration,
+ uint32_t *purse_account_limit,
+ struct TALER_MasterSignatureP *master_sig);
/**
@@ -4899,10 +4899,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*get_expired_reserves)(void *cls,
- struct GNUNET_TIME_Timestamp now,
- TALER_EXCHANGEDB_ReserveExpiredCallback rec,
- void *rec_cls);
+ (*get_expired_reserves)(void *cls,
+ struct GNUNET_TIME_Timestamp now,
+ TALER_EXCHANGEDB_ReserveExpiredCallback rec,
+ void *rec_cls);
/**
@@ -4917,7 +4917,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*get_unfinished_close_requests)(
+ (*get_unfinished_close_requests)(
void *cls,
TALER_EXCHANGEDB_ReserveExpiredCallback rec,
void *rec_cls);
@@ -4938,7 +4938,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code, 0 if operation is already in the DB
*/
enum GNUNET_DB_QueryStatus
- (*insert_reserve_open_deposit)(
+ (*insert_reserve_open_deposit)(
void *cls,
const struct TALER_CoinPublicInfo *cpi,
const struct TALER_CoinSpendSignatureP *coin_sig,
@@ -4968,19 +4968,19 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*do_reserve_open)(void *cls,
- const struct TALER_ReservePublicKeyP *reserve_pub,
- const struct TALER_Amount *total_paid,
- const struct TALER_Amount *reserve_payment,
- uint32_t min_purse_limit,
- const struct TALER_ReserveSignatureP *reserve_sig,
- struct GNUNET_TIME_Timestamp desired_expiration,
- struct GNUNET_TIME_Timestamp now,
- const struct TALER_Amount *open_fee,
- bool *no_funds,
- struct TALER_Amount *reserve_balance,
- struct TALER_Amount *open_cost,
- struct GNUNET_TIME_Timestamp *final_expiration);
+ (*do_reserve_open)(void *cls,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ const struct TALER_Amount *total_paid,
+ const struct TALER_Amount *reserve_payment,
+ uint32_t min_purse_limit,
+ const struct TALER_ReserveSignatureP *reserve_sig,
+ struct GNUNET_TIME_Timestamp desired_expiration,
+ struct GNUNET_TIME_Timestamp now,
+ const struct TALER_Amount *open_fee,
+ bool *no_funds,
+ struct TALER_Amount *reserve_balance,
+ struct TALER_Amount *open_cost,
+ struct GNUNET_TIME_Timestamp *final_expiration);
/**
@@ -4996,7 +4996,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code, 0 if reserve unknown
*/
enum GNUNET_DB_QueryStatus
- (*select_reserve_close_info)(
+ (*select_reserve_close_info)(
void *cls,
const struct TALER_ReservePublicKeyP *reserve_pub,
struct TALER_Amount *balance,
@@ -5019,7 +5019,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code, 0 if reserve unknown
*/
enum GNUNET_DB_QueryStatus
- (*select_reserve_close_request_info)(
+ (*select_reserve_close_request_info)(
void *cls,
const struct TALER_ReservePublicKeyP *reserve_pub,
uint64_t rowid,
@@ -5043,7 +5043,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code, @a kac aborting with #GNUNET_NO is not an error
*/
enum GNUNET_DB_QueryStatus
- (*iterate_reserve_close_info)(
+ (*iterate_reserve_close_info)(
void *cls,
const struct TALER_PaytoHashP *h_payto,
struct GNUNET_TIME_Absolute time_limit,
@@ -5065,15 +5065,15 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_reserve_closed)(void *cls,
- const struct TALER_ReservePublicKeyP *reserve_pub,
- struct GNUNET_TIME_Timestamp execution_date,
- const char *receiver_account,
- const struct
- TALER_WireTransferIdentifierRawP *wtid,
- const struct TALER_Amount *amount_with_fee,
- const struct TALER_Amount *closing_fee,
- uint64_t close_request_row);
+ (*insert_reserve_closed)(void *cls,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ struct GNUNET_TIME_Timestamp execution_date,
+ const char *receiver_account,
+ const struct
+ TALER_WireTransferIdentifierRawP *wtid,
+ const struct TALER_Amount *amount_with_fee,
+ const struct TALER_Amount *closing_fee,
+ uint64_t close_request_row);
/**
@@ -5086,10 +5086,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return query status code
*/
enum GNUNET_DB_QueryStatus
- (*wire_prepare_data_insert)(void *cls,
- const char *type,
- const char *buf,
- size_t buf_size);
+ (*wire_prepare_data_insert)(void *cls,
+ const char *type,
+ const char *buf,
+ size_t buf_size);
/**
@@ -5100,8 +5100,8 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*wire_prepare_data_mark_finished)(void *cls,
- uint64_t rowid);
+ (*wire_prepare_data_mark_finished)(void *cls,
+ uint64_t rowid);
/**
@@ -5112,8 +5112,8 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*wire_prepare_data_mark_failed)(void *cls,
- uint64_t rowid);
+ (*wire_prepare_data_mark_failed)(void *cls,
+ uint64_t rowid);
/**
@@ -5128,11 +5128,11 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*wire_prepare_data_get)(void *cls,
- uint64_t start_row,
- uint64_t limit,
- TALER_EXCHANGEDB_WirePreparationIterator cb,
- void *cb_cls);
+ (*wire_prepare_data_get)(void *cls,
+ uint64_t start_row,
+ uint64_t limit,
+ TALER_EXCHANGEDB_WirePreparationIterator cb,
+ void *cb_cls);
/**
@@ -5144,7 +5144,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return #GNUNET_OK on success
*/
enum GNUNET_GenericReturnValue
- (*start_deferred_wire_out)(void *cls);
+ (*start_deferred_wire_out)(void *cls);
/**
@@ -5161,7 +5161,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*store_wire_transfer_out)(
+ (*store_wire_transfer_out)(
void *cls,
struct GNUNET_TIME_Timestamp date,
const struct TALER_WireTransferIdentifierRawP *wtid,
@@ -5179,7 +5179,7 @@ struct TALER_EXCHANGEDB_Plugin
* #GNUNET_SYSERR on DB errors
*/
enum GNUNET_GenericReturnValue
- (*gc)(void *cls);
+ (*gc)(void *cls);
/**
@@ -5193,10 +5193,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_coin_deposits_above_serial_id)(void *cls,
- uint64_t serial_id,
- TALER_EXCHANGEDB_DepositCallback cb,
- void *cb_cls);
+ (*select_coin_deposits_above_serial_id)(void *cls,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_DepositCallback cb,
+ void *cb_cls);
/**
@@ -5210,7 +5210,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_purse_requests_above_serial_id)(
+ (*select_purse_requests_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_PurseRequestCallback cb,
@@ -5228,7 +5228,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_purse_deposits_above_serial_id)(
+ (*select_purse_deposits_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_PurseDepositCallback cb,
@@ -5246,7 +5246,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_account_merges_above_serial_id)(
+ (*select_account_merges_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_AccountMergeCallback cb,
@@ -5264,7 +5264,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_purse_merges_above_serial_id)(
+ (*select_purse_merges_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_PurseMergeCallback cb,
@@ -5283,7 +5283,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_purse_decisions_above_serial_id)(
+ (*select_purse_decisions_above_serial_id)(
void *cls,
uint64_t serial_id,
bool refunded,
@@ -5302,7 +5302,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_all_purse_decisions_above_serial_id)(
+ (*select_all_purse_decisions_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_AllPurseDecisionCallback cb,
@@ -5319,7 +5319,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_purse_deposits_by_purse)(
+ (*select_purse_deposits_by_purse)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
TALER_EXCHANGEDB_PurseRefundCoinCallback cb,
@@ -5337,10 +5337,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_refreshes_above_serial_id)(void *cls,
- uint64_t serial_id,
- TALER_EXCHANGEDB_RefreshesCallback cb,
- void *cb_cls);
+ (*select_refreshes_above_serial_id)(void *cls,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_RefreshesCallback cb,
+ void *cb_cls);
/**
@@ -5354,10 +5354,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_refunds_above_serial_id)(void *cls,
- uint64_t serial_id,
- TALER_EXCHANGEDB_RefundCallback cb,
- void *cb_cls);
+ (*select_refunds_above_serial_id)(void *cls,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_RefundCallback cb,
+ void *cb_cls);
/**
@@ -5371,10 +5371,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_reserves_in_above_serial_id)(void *cls,
- uint64_t serial_id,
- TALER_EXCHANGEDB_ReserveInCallback cb,
- void *cb_cls);
+ (*select_reserves_in_above_serial_id)(void *cls,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_ReserveInCallback cb,
+ void *cb_cls);
/**
@@ -5389,7 +5389,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_reserves_in_above_serial_id_by_account)(
+ (*select_reserves_in_above_serial_id_by_account)(
void *cls,
const char *account_name,
uint64_t serial_id,
@@ -5409,7 +5409,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_withdrawals_above_serial_id)(
+ (*select_withdrawals_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_WithdrawCallback cb,
@@ -5427,11 +5427,11 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_wire_out_above_serial_id)(void *cls,
- uint64_t serial_id,
- TALER_EXCHANGEDB_WireTransferOutCallback
- cb,
- void *cb_cls);
+ (*select_wire_out_above_serial_id)(void *cls,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_WireTransferOutCallback
+ cb,
+ void *cb_cls);
/**
* Function called to select outgoing wire transfers the exchange
@@ -5445,7 +5445,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_wire_out_above_serial_id_by_account)(
+ (*select_wire_out_above_serial_id_by_account)(
void *cls,
const char *account_name,
uint64_t serial_id,
@@ -5464,10 +5464,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_recoup_above_serial_id)(void *cls,
- uint64_t serial_id,
- TALER_EXCHANGEDB_RecoupCallback cb,
- void *cb_cls);
+ (*select_recoup_above_serial_id)(void *cls,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_RecoupCallback cb,
+ void *cb_cls);
/**
@@ -5481,7 +5481,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_recoup_refresh_above_serial_id)(
+ (*select_recoup_refresh_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_RecoupRefreshCallback cb,
@@ -5499,7 +5499,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_reserve_open_above_serial_id)(
+ (*select_reserve_open_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_ReserveOpenCallback cb,
@@ -5517,7 +5517,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_reserve_closed_above_serial_id)(
+ (*select_reserve_closed_above_serial_id)(
void *cls,
uint64_t serial_id,
TALER_EXCHANGEDB_ReserveClosedCallback cb,
@@ -5535,7 +5535,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_reserve_by_h_blind)(
+ (*get_reserve_by_h_blind)(
void *cls,
const struct TALER_BlindedCoinHashP *bch,
struct TALER_ReservePublicKeyP *reserve_pub,
@@ -5553,7 +5553,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_old_coin_by_h_blind)(
+ (*get_old_coin_by_h_blind)(
void *cls,
const struct TALER_BlindedCoinHashP *h_blind_ev,
struct TALER_CoinSpendPublicKeyP *old_coin_pub,
@@ -5570,7 +5570,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_denomination_revocation)(
+ (*insert_denomination_revocation)(
void *cls,
const struct TALER_DenominationHashP *denom_pub_hash,
const struct TALER_MasterSignatureP *master_sig);
@@ -5587,7 +5587,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_denomination_revocation)(
+ (*get_denomination_revocation)(
void *cls,
const struct TALER_DenominationHashP *denom_pub_hash,
struct TALER_MasterSignatureP *master_sig,
@@ -5605,7 +5605,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_batch_deposits_missing_wire)(
+ (*select_batch_deposits_missing_wire)(
void *cls,
uint64_t min_batch_deposit_serial_id,
TALER_EXCHANGEDB_WireMissingCallback cb,
@@ -5623,7 +5623,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_aggregations_above_serial)(
+ (*select_aggregations_above_serial)(
void *cls,
uint64_t min_tracking_serial_id,
TALER_EXCHANGEDB_AggregationCallback cb,
@@ -5645,7 +5645,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_justification_for_missing_wire)(
+ (*select_justification_for_missing_wire)(
void *cls,
const struct TALER_PaytoHashP *wire_target_h_payto,
char **payto_uri,
@@ -5663,7 +5663,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*lookup_auditor_timestamp)(
+ (*lookup_auditor_timestamp)(
void *cls,
const struct TALER_AuditorPublicKeyP *auditor_pub,
struct GNUNET_TIME_Timestamp *last_date);
@@ -5680,7 +5680,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*lookup_auditor_status)(
+ (*lookup_auditor_status)(
void *cls,
const struct TALER_AuditorPublicKeyP *auditor_pub,
char **auditor_url,
@@ -5699,7 +5699,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_auditor)(
+ (*insert_auditor)(
void *cls,
const struct TALER_AuditorPublicKeyP *auditor_pub,
const char *auditor_url,
@@ -5720,7 +5720,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*update_auditor)(
+ (*update_auditor)(
void *cls,
const struct TALER_AuditorPublicKeyP *auditor_pub,
const char *auditor_url,
@@ -5738,9 +5738,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*lookup_wire_timestamp)(void *cls,
- const char *payto_uri,
- struct GNUNET_TIME_Timestamp *last_date);
+ (*lookup_wire_timestamp)(void *cls,
+ const char *payto_uri,
+ struct GNUNET_TIME_Timestamp *last_date);
/**
@@ -5758,13 +5758,13 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_wire)(void *cls,
- const char *payto_uri,
- const char *conversion_url,
- const json_t *debit_restrictions,
- const json_t *credit_restrictions,
- struct GNUNET_TIME_Timestamp start_date,
- const struct TALER_MasterSignatureP *master_sig);
+ (*insert_wire)(void *cls,
+ const char *payto_uri,
+ const char *conversion_url,
+ const json_t *debit_restrictions,
+ const json_t *credit_restrictions,
+ struct GNUNET_TIME_Timestamp start_date,
+ const struct TALER_MasterSignatureP *master_sig);
/**
@@ -5781,13 +5781,13 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*update_wire)(void *cls,
- const char *payto_uri,
- const char *conversion_url,
- const json_t *debit_restrictions,
- const json_t *credit_restrictions,
- struct GNUNET_TIME_Timestamp change_date,
- bool enabled);
+ (*update_wire)(void *cls,
+ const char *payto_uri,
+ const char *conversion_url,
+ const json_t *debit_restrictions,
+ const json_t *credit_restrictions,
+ struct GNUNET_TIME_Timestamp change_date,
+ bool enabled);
/**
@@ -5799,9 +5799,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_wire_accounts)(void *cls,
- TALER_EXCHANGEDB_WireAccountCallback cb,
- void *cb_cls);
+ (*get_wire_accounts)(void *cls,
+ TALER_EXCHANGEDB_WireAccountCallback cb,
+ void *cb_cls);
/**
@@ -5815,10 +5815,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_wire_fees)(void *cls,
- const char *wire_method,
- TALER_EXCHANGEDB_WireFeeCallback cb,
- void *cb_cls);
+ (*get_wire_fees)(void *cls,
+ const char *wire_method,
+ TALER_EXCHANGEDB_WireFeeCallback cb,
+ void *cb_cls);
/**
@@ -5830,9 +5830,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_global_fees)(void *cls,
- TALER_EXCHANGEDB_GlobalFeeCallback cb,
- void *cb_cls);
+ (*get_global_fees)(void *cls,
+ TALER_EXCHANGEDB_GlobalFeeCallback cb,
+ void *cb_cls);
/**
@@ -5844,7 +5844,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_signkey_revocation)(
+ (*insert_signkey_revocation)(
void *cls,
const struct TALER_ExchangePublicKeyP *exchange_pub,
const struct TALER_MasterSignatureP *master_sig);
@@ -5859,7 +5859,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*lookup_signkey_revocation)(
+ (*lookup_signkey_revocation)(
void *cls,
const struct TALER_ExchangePublicKeyP *exchange_pub,
struct TALER_MasterSignatureP *master_sig);
@@ -5874,7 +5874,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*lookup_denomination_key)(
+ (*lookup_denomination_key)(
void *cls,
const struct TALER_DenominationHashP *h_denom_pub,
struct TALER_EXCHANGEDB_DenominationKeyMetaData *meta);
@@ -5891,7 +5891,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*add_denomination_key)(
+ (*add_denomination_key)(
void *cls,
const struct TALER_DenominationHashP *h_denom_pub,
const struct TALER_DenominationPublicKey *denom_pub,
@@ -5910,7 +5910,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*activate_signing_key)(
+ (*activate_signing_key)(
void *cls,
const struct TALER_ExchangePublicKeyP *exchange_pub,
const struct TALER_EXCHANGEDB_SignkeyMetaData *meta,
@@ -5926,7 +5926,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*lookup_signing_key)(
+ (*lookup_signing_key)(
void *cls,
const struct TALER_ExchangePublicKeyP *exchange_pub,
struct TALER_EXCHANGEDB_SignkeyMetaData *meta);
@@ -5942,7 +5942,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_auditor_denom_sig)(
+ (*insert_auditor_denom_sig)(
void *cls,
const struct TALER_DenominationHashP *h_denom_pub,
const struct TALER_AuditorPublicKeyP *auditor_pub,
@@ -5959,7 +5959,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_auditor_denom_sig)(
+ (*select_auditor_denom_sig)(
void *cls,
const struct TALER_DenominationHashP *h_denom_pub,
const struct TALER_AuditorPublicKeyP *auditor_pub,
@@ -5979,7 +5979,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*lookup_wire_fee_by_time)(
+ (*lookup_wire_fee_by_time)(
void *cls,
const char *wire_method,
struct GNUNET_TIME_Timestamp start_time,
@@ -6002,7 +6002,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*lookup_global_fee_by_time)(
+ (*lookup_global_fee_by_time)(
void *cls,
struct GNUNET_TIME_Timestamp start_time,
struct GNUNET_TIME_Timestamp end_time,
@@ -6023,9 +6023,9 @@ struct TALER_EXCHANGEDB_Plugin
* @a table does not have a serial number
*/
enum GNUNET_DB_QueryStatus
- (*lookup_serial_by_table)(void *cls,
- enum TALER_EXCHANGEDB_ReplicatedTable table,
- uint64_t *serial);
+ (*lookup_serial_by_table)(void *cls,
+ enum TALER_EXCHANGEDB_ReplicatedTable table,
+ uint64_t *serial);
/**
* Lookup records above @a serial number in @a table. Used in
@@ -6040,11 +6040,11 @@ struct TALER_EXCHANGEDB_Plugin
* @a table does not have a serial number
*/
enum GNUNET_DB_QueryStatus
- (*lookup_records_by_table)(void *cls,
- enum TALER_EXCHANGEDB_ReplicatedTable table,
- uint64_t serial,
- TALER_EXCHANGEDB_ReplicationCallback cb,
- void *cb_cls);
+ (*lookup_records_by_table)(void *cls,
+ enum TALER_EXCHANGEDB_ReplicatedTable table,
+ uint64_t serial,
+ TALER_EXCHANGEDB_ReplicationCallback cb,
+ void *cb_cls);
/**
@@ -6058,8 +6058,8 @@ struct TALER_EXCHANGEDB_Plugin
* @a table does not have a serial number
*/
enum GNUNET_DB_QueryStatus
- (*insert_records_by_table)(void *cls,
- const struct TALER_EXCHANGEDB_TableData *td);
+ (*insert_records_by_table)(void *cls,
+ const struct TALER_EXCHANGEDB_TableData *td);
/**
@@ -6075,12 +6075,12 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*begin_shard)(void *cls,
- const char *job_name,
- struct GNUNET_TIME_Relative delay,
- uint64_t shard_size,
- uint64_t *start_row,
- uint64_t *end_row);
+ (*begin_shard)(void *cls,
+ const char *job_name,
+ struct GNUNET_TIME_Relative delay,
+ uint64_t shard_size,
+ uint64_t *start_row,
+ uint64_t *end_row);
/**
* Function called to abort work on a shard.
@@ -6092,10 +6092,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*abort_shard)(void *cls,
- const char *job_name,
- uint64_t start_row,
- uint64_t end_row);
+ (*abort_shard)(void *cls,
+ const char *job_name,
+ uint64_t start_row,
+ uint64_t end_row);
/**
* Function called to persist that work on a shard was completed.
@@ -6107,10 +6107,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*complete_shard)(void *cls,
- const char *job_name,
- uint64_t start_row,
- uint64_t end_row);
+ (*complete_shard)(void *cls,
+ const char *job_name,
+ uint64_t start_row,
+ uint64_t end_row);
/**
@@ -6126,12 +6126,12 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*begin_revolving_shard)(void *cls,
- const char *job_name,
- uint32_t shard_size,
- uint32_t shard_limit,
- uint32_t *start_row,
- uint32_t *end_row);
+ (*begin_revolving_shard)(void *cls,
+ const char *job_name,
+ uint32_t shard_size,
+ uint32_t shard_limit,
+ uint32_t *start_row,
+ uint32_t *end_row);
/**
@@ -6145,10 +6145,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*release_revolving_shard)(void *cls,
- const char *job_name,
- uint32_t start_row,
- uint32_t end_row);
+ (*release_revolving_shard)(void *cls,
+ const char *job_name,
+ uint32_t start_row,
+ uint32_t end_row);
/**
@@ -6161,7 +6161,7 @@ struct TALER_EXCHANGEDB_Plugin
* #GNUNET_SYSERR on failure
*/
enum GNUNET_GenericReturnValue
- (*delete_shard_locks)(void *cls);
+ (*delete_shard_locks)(void *cls);
/**
@@ -6174,9 +6174,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*set_extension_manifest)(void *cls,
- const char *extension_name,
- const char *manifest);
+ (*set_extension_manifest)(void *cls,
+ const char *extension_name,
+ const char *manifest);
/**
@@ -6189,9 +6189,9 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_extension_manifest)(void *cls,
- const char *extension_name,
- char **manifest);
+ (*get_extension_manifest)(void *cls,
+ const char *extension_name,
+ char **manifest);
/**
@@ -6209,14 +6209,14 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_partner)(void *cls,
- const struct TALER_MasterPublicKeyP *master_pub,
- struct GNUNET_TIME_Timestamp start_date,
- struct GNUNET_TIME_Timestamp end_date,
- struct GNUNET_TIME_Relative wad_frequency,
- const struct TALER_Amount *wad_fee,
- const char *partner_base_url,
- const struct TALER_MasterSignatureP *master_sig);
+ (*insert_partner)(void *cls,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ struct GNUNET_TIME_Timestamp start_date,
+ struct GNUNET_TIME_Timestamp end_date,
+ struct GNUNET_TIME_Relative wad_frequency,
+ const struct TALER_Amount *wad_fee,
+ const char *partner_base_url,
+ const struct TALER_MasterSignatureP *master_sig);
/**
@@ -6232,10 +6232,10 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_contract)(void *cls,
- const struct TALER_PurseContractPublicKeyP *purse_pub,
- const struct TALER_EncryptedContract *econtract,
- bool *in_conflict);
+ (*insert_contract)(void *cls,
+ const struct TALER_PurseContractPublicKeyP *purse_pub,
+ const struct TALER_EncryptedContract *econtract,
+ bool *in_conflict);
/**
@@ -6250,7 +6250,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_contract)(
+ (*select_contract)(
void *cls,
const struct TALER_ContractDiffiePublicP *pub_ckey,
struct TALER_PurseContractPublicKeyP *purse_pub,
@@ -6268,7 +6268,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_contract_by_purse)(
+ (*select_contract_by_purse)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
struct TALER_EncryptedContract *econtract);
@@ -6294,7 +6294,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_purse_request)(
+ (*insert_purse_request)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
const struct TALER_PurseMergePublicKeyP *merge_pub,
@@ -6317,7 +6317,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code (#GNUNET_DB_STATUS_SUCCESS_NO_RESULTS if no purse expired in the given time interval).
*/
enum GNUNET_DB_QueryStatus
- (*expire_purse)(
+ (*expire_purse)(
void *cls,
struct GNUNET_TIME_Absolute start_time,
struct GNUNET_TIME_Absolute end_time);
@@ -6338,7 +6338,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_purse)(
+ (*select_purse)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
struct GNUNET_TIME_Timestamp *purse_creation,
@@ -6366,7 +6366,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_purse_request)(
+ (*get_purse_request)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
struct TALER_PurseMergePublicKeyP *merge_pub,
@@ -6394,7 +6394,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_purse_by_merge_pub)(
+ (*select_purse_by_merge_pub)(
void *cls,
const struct TALER_PurseMergePublicKeyP *merge_pub,
struct TALER_PurseContractPublicKeyP *purse_pub,
@@ -6430,7 +6430,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*do_purse_deposit)(
+ (*do_purse_deposit)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
@@ -6455,7 +6455,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*do_purse_delete)(
+ (*do_purse_delete)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
const struct TALER_PurseContractSignatureP *purse_sig,
@@ -6474,7 +6474,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*set_purse_balance)(
+ (*set_purse_balance)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
const struct TALER_Amount *balance);
@@ -6495,7 +6495,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_purse_deposit)(
+ (*get_purse_deposit)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
@@ -6525,7 +6525,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*do_purse_merge)(
+ (*do_purse_merge)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
const struct TALER_PurseMergeSignatureP *merge_sig,
@@ -6556,7 +6556,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*do_reserve_purse)(
+ (*do_reserve_purse)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
const struct TALER_PurseMergeSignatureP *merge_sig,
@@ -6579,16 +6579,18 @@ struct TALER_EXCHANGEDB_Plugin
* @param[out] merge_timestamp set to the time of the merge
* @param[out] partner_url set to the URL of the target exchange, or NULL if the target exchange is us. To be freed by the caller.
* @param[out] reserve_pub set to the public key of the reserve/account being credited
+ * @param[out] refunded set to true if purse was refunded
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_purse_merge)(
+ (*select_purse_merge)(
void *cls,
const struct TALER_PurseContractPublicKeyP *purse_pub,
struct TALER_PurseMergeSignatureP *merge_sig,
struct GNUNET_TIME_Timestamp *merge_timestamp,
char **partner_url,
- struct TALER_ReservePublicKeyP *reserve_pub);
+ struct TALER_ReservePublicKeyP *reserve_pub,
+ bool *refunded);
/**
@@ -6604,13 +6606,13 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_close_request)(void *cls,
- const struct TALER_ReservePublicKeyP *reserve_pub,
- const char *payto_uri,
- const struct TALER_ReserveSignatureP *reserve_sig,
- struct GNUNET_TIME_Timestamp request_timestamp,
- const struct TALER_Amount *balance,
- const struct TALER_Amount *closing_fee);
+ (*insert_close_request)(void *cls,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ const char *payto_uri,
+ const struct TALER_ReserveSignatureP *reserve_sig,
+ struct GNUNET_TIME_Timestamp request_timestamp,
+ const struct TALER_Amount *balance,
+ const struct TALER_Amount *closing_fee);
/**
@@ -6626,13 +6628,13 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_drain_profit)(void *cls,
- const struct TALER_WireTransferIdentifierRawP *wtid,
- const char *account_section,
- const char *payto_uri,
- struct GNUNET_TIME_Timestamp request_timestamp,
- const struct TALER_Amount *amount,
- const struct TALER_MasterSignatureP *master_sig);
+ (*insert_drain_profit)(void *cls,
+ const struct TALER_WireTransferIdentifierRawP *wtid,
+ const char *account_section,
+ const char *payto_uri,
+ struct GNUNET_TIME_Timestamp request_timestamp,
+ const struct TALER_Amount *amount,
+ const struct TALER_MasterSignatureP *master_sig);
/**
@@ -6649,14 +6651,14 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_drain_profit)(void *cls,
- const struct TALER_WireTransferIdentifierRawP *wtid,
- uint64_t *serial,
- char **account_section,
- char **payto_uri,
- struct GNUNET_TIME_Timestamp *request_timestamp,
- struct TALER_Amount *amount,
- struct TALER_MasterSignatureP *master_sig);
+ (*get_drain_profit)(void *cls,
+ const struct TALER_WireTransferIdentifierRawP *wtid,
+ uint64_t *serial,
+ char **account_section,
+ char **payto_uri,
+ struct GNUNET_TIME_Timestamp *request_timestamp,
+ struct TALER_Amount *amount,
+ struct TALER_MasterSignatureP *master_sig);
/**
@@ -6673,7 +6675,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*profit_drains_get_pending)(
+ (*profit_drains_get_pending)(
void *cls,
uint64_t *serial,
struct TALER_WireTransferIdentifierRawP *wtid,
@@ -6692,7 +6694,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*profit_drains_set_finished)(
+ (*profit_drains_set_finished)(
void *cls,
uint64_t serial);
@@ -6708,7 +6710,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*insert_kyc_requirement_for_account)(
+ (*insert_kyc_requirement_for_account)(
void *cls,
const char *requirements,
const struct TALER_PaytoHashP *h_payto,
@@ -6728,7 +6730,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*insert_kyc_requirement_process)(
+ (*insert_kyc_requirement_process)(
void *cls,
const struct TALER_PaytoHashP *h_payto,
const char *provider_section,
@@ -6747,7 +6749,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*get_pending_kyc_requirement_process)(
+ (*get_pending_kyc_requirement_process)(
void *cls,
const struct TALER_PaytoHashP *h_payto,
const char *provider_section,
@@ -6769,7 +6771,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*update_kyc_process_by_row)(
+ (*update_kyc_process_by_row)(
void *cls,
uint64_t process_row,
const char *provider_section,
@@ -6791,7 +6793,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*lookup_kyc_requirement_by_row)(
+ (*lookup_kyc_requirement_by_row)(
void *cls,
uint64_t requirement_row,
char **requirements,
@@ -6812,7 +6814,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*lookup_kyc_process_by_account)(
+ (*lookup_kyc_process_by_account)(
void *cls,
const char *provider_section,
const struct TALER_PaytoHashP *h_payto,
@@ -6834,7 +6836,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*kyc_provider_account_lookup)(
+ (*kyc_provider_account_lookup)(
void *cls,
const char *provider_section,
const char *provider_legitimization_id,
@@ -6853,7 +6855,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_satisfied_kyc_processes)(
+ (*select_satisfied_kyc_processes)(
void *cls,
const struct TALER_PaytoHashP *h_payto,
TALER_EXCHANGEDB_SatisfiedProviderCallback spc,
@@ -6871,7 +6873,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*iterate_kyc_reference)(
+ (*iterate_kyc_reference)(
void *cls,
const struct TALER_PaytoHashP *h_payto,
TALER_EXCHANGEDB_LegitimizationProcessCallback lpc,
@@ -6890,7 +6892,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code, @a kac aborting with #GNUNET_NO is not an error
*/
enum GNUNET_DB_QueryStatus
- (*select_withdraw_amounts_for_kyc_check)(
+ (*select_withdraw_amounts_for_kyc_check)(
void *cls,
const struct TALER_PaytoHashP *h_payto,
struct GNUNET_TIME_Absolute time_limit,
@@ -6910,7 +6912,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code, @a kac aborting with #GNUNET_NO is not an error
*/
enum GNUNET_DB_QueryStatus
- (*select_aggregation_amounts_for_kyc_check)(
+ (*select_aggregation_amounts_for_kyc_check)(
void *cls,
const struct TALER_PaytoHashP *h_payto,
struct GNUNET_TIME_Absolute time_limit,
@@ -6930,7 +6932,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code, @a kac aborting with #GNUNET_NO is not an error
*/
enum GNUNET_DB_QueryStatus
- (*select_merge_amounts_for_kyc_check)(
+ (*select_merge_amounts_for_kyc_check)(
void *cls,
const struct TALER_PaytoHashP *h_payto,
struct GNUNET_TIME_Absolute time_limit,
@@ -6960,7 +6962,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*insert_kyc_attributes)(
+ (*insert_kyc_attributes)(
void *cls,
uint64_t process_row,
const struct TALER_PaytoHashP *h_payto,
@@ -6988,7 +6990,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*select_similar_kyc_attributes)(
+ (*select_similar_kyc_attributes)(
void *cls,
const struct GNUNET_ShortHashCode *kyc_prox,
TALER_EXCHANGEDB_AttributeCallback cb,
@@ -7005,7 +7007,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*select_kyc_attributes)(
+ (*select_kyc_attributes)(
void *cls,
const struct TALER_PaytoHashP *h_payto,
TALER_EXCHANGEDB_AttributeCallback cb,
@@ -7026,7 +7028,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*insert_aml_officer)(
+ (*insert_aml_officer)(
void *cls,
const struct TALER_AmlOfficerPublicKeyP *decider_pub,
const struct TALER_MasterSignatureP *master_sig,
@@ -7046,7 +7048,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status, if member is unknown or not active, 1 if member is active
*/
enum GNUNET_DB_QueryStatus
- (*test_aml_officer)(
+ (*test_aml_officer)(
void *cls,
const struct TALER_AmlOfficerPublicKeyP *decider_pub);
@@ -7064,7 +7066,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*lookup_aml_officer)(
+ (*lookup_aml_officer)(
void *cls,
const struct TALER_AmlOfficerPublicKeyP *decider_pub,
struct TALER_MasterSignatureP *master_sig,
@@ -7084,7 +7086,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status, 0 if no threshold was set
*/
enum GNUNET_DB_QueryStatus
- (*select_aml_threshold)(
+ (*select_aml_threshold)(
void *cls,
const struct TALER_PaytoHashP *h_payto,
enum TALER_AmlDecisionState *decision,
@@ -7102,7 +7104,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*trigger_aml_process)(
+ (*trigger_aml_process)(
void *cls,
const struct TALER_PaytoHashP *h_payto,
const struct TALER_Amount *threshold_crossed);
@@ -7120,7 +7122,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*select_aml_process)(
+ (*select_aml_process)(
void *cls,
enum TALER_AmlDecisionState decision,
uint64_t row_off,
@@ -7140,7 +7142,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*select_aml_history)(
+ (*select_aml_history)(
void *cls,
const struct TALER_PaytoHashP *h_payto,
TALER_EXCHANGEDB_AmlHistoryCallback cb,
@@ -7167,7 +7169,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
- (*insert_aml_decision)(
+ (*insert_aml_decision)(
void *cls,
const struct TALER_PaytoHashP *h_payto,
const struct TALER_Amount *new_threshold,