rename for consistency
This commit is contained in:
parent
7dd52a0892
commit
a49bfef2fb
@ -1641,9 +1641,9 @@ verify_reserve_balance (void *cls,
|
|||||||
|
|
||||||
ret = GNUNET_OK;
|
ret = GNUNET_OK;
|
||||||
reserve.pub = rs->reserve_pub;
|
reserve.pub = rs->reserve_pub;
|
||||||
qs = edb->reserve_get (edb->cls,
|
qs = edb->reserves_get (edb->cls,
|
||||||
esession,
|
esession,
|
||||||
&reserve);
|
&reserve);
|
||||||
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs)
|
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs)
|
||||||
{
|
{
|
||||||
char *diag;
|
char *diag;
|
||||||
@ -1956,11 +1956,11 @@ analyze_reserves (void *cls)
|
|||||||
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
|
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
|
||||||
return qs;
|
return qs;
|
||||||
}
|
}
|
||||||
qs = edb->select_reserves_out_above_serial_id (edb->cls,
|
qs = edb->select_withdrawals_above_serial_id (edb->cls,
|
||||||
esession,
|
esession,
|
||||||
ppr.last_reserve_out_serial_id,
|
ppr.last_reserve_out_serial_id,
|
||||||
&handle_reserve_out,
|
&handle_reserve_out,
|
||||||
&rc);
|
&rc);
|
||||||
if (qs < 0)
|
if (qs < 0)
|
||||||
{
|
{
|
||||||
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
|
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
|
||||||
@ -4712,12 +4712,12 @@ analyze_coins (void *cls)
|
|||||||
|
|
||||||
/* process withdrawals */
|
/* process withdrawals */
|
||||||
if (0 >
|
if (0 >
|
||||||
(qs = edb->select_reserves_out_above_serial_id (edb->cls,
|
(qs = edb->select_withdrawals_above_serial_id (edb->cls,
|
||||||
esession,
|
esession,
|
||||||
ppc.
|
ppc.
|
||||||
last_withdraw_serial_id,
|
last_withdraw_serial_id,
|
||||||
&withdraw_cb,
|
&withdraw_cb,
|
||||||
&cc)) )
|
&cc)) )
|
||||||
{
|
{
|
||||||
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
|
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
|
||||||
return qs;
|
return qs;
|
||||||
@ -4741,11 +4741,11 @@ analyze_coins (void *cls)
|
|||||||
|
|
||||||
/* process refreshs */
|
/* process refreshs */
|
||||||
if (0 >
|
if (0 >
|
||||||
(qs = edb->select_refreshs_above_serial_id (edb->cls,
|
(qs = edb->select_refreshes_above_serial_id (edb->cls,
|
||||||
esession,
|
esession,
|
||||||
ppc.last_melt_serial_id,
|
ppc.last_melt_serial_id,
|
||||||
&refresh_session_cb,
|
&refresh_session_cb,
|
||||||
&cc)))
|
&cc)))
|
||||||
{
|
{
|
||||||
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
|
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
|
||||||
return qs;
|
return qs;
|
||||||
|
@ -234,9 +234,9 @@ withdraw_transaction (void *cls,
|
|||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||||
"Trying to withdraw from reserve: %s\n",
|
"Trying to withdraw from reserve: %s\n",
|
||||||
TALER_B2S (&r.pub));
|
TALER_B2S (&r.pub));
|
||||||
qs = TEH_plugin->reserve_get (TEH_plugin->cls,
|
qs = TEH_plugin->reserves_get (TEH_plugin->cls,
|
||||||
session,
|
session,
|
||||||
&r);
|
&r);
|
||||||
if (0 > qs)
|
if (0 > qs)
|
||||||
{
|
{
|
||||||
if (GNUNET_DB_STATUS_HARD_ERROR == qs)
|
if (GNUNET_DB_STATUS_HARD_ERROR == qs)
|
||||||
|
@ -341,8 +341,8 @@ postgres_get_session (void *cls)
|
|||||||
" FROM denomination_revocations"
|
" FROM denomination_revocations"
|
||||||
" WHERE denom_pub_hash=$1;",
|
" WHERE denom_pub_hash=$1;",
|
||||||
1),
|
1),
|
||||||
/* Used in #postgres_reserve_get() */
|
/* Used in #postgres_reserves_get() */
|
||||||
GNUNET_PQ_make_prepare ("reserve_get",
|
GNUNET_PQ_make_prepare ("reserves_get",
|
||||||
"SELECT"
|
"SELECT"
|
||||||
" current_balance_val"
|
" current_balance_val"
|
||||||
",current_balance_frac"
|
",current_balance_frac"
|
||||||
@ -525,7 +525,7 @@ postgres_get_session (void *cls)
|
|||||||
" WHERE reserve_pub=$1"
|
" WHERE reserve_pub=$1"
|
||||||
" FOR UPDATE",
|
" FOR UPDATE",
|
||||||
1),
|
1),
|
||||||
/* Used in #postgres_select_reserves_out_above_serial_id() */
|
/* Used in #postgres_select_withdrawals_above_serial_id() */
|
||||||
GNUNET_PQ_make_prepare ("audit_get_reserves_out_incr",
|
GNUNET_PQ_make_prepare ("audit_get_reserves_out_incr",
|
||||||
"SELECT"
|
"SELECT"
|
||||||
" h_blind_ev"
|
" h_blind_ev"
|
||||||
@ -628,7 +628,7 @@ postgres_get_session (void *cls)
|
|||||||
" FROM refresh_commitments"
|
" FROM refresh_commitments"
|
||||||
" WHERE rc=$1;",
|
" WHERE rc=$1;",
|
||||||
1),
|
1),
|
||||||
/* Used in #postgres_select_refreshs_above_serial_id() to fetch
|
/* Used in #postgres_select_refreshes_above_serial_id() to fetch
|
||||||
refresh session with id '\geq' the given parameter */
|
refresh session with id '\geq' the given parameter */
|
||||||
GNUNET_PQ_make_prepare ("audit_get_refresh_commitments_incr",
|
GNUNET_PQ_make_prepare ("audit_get_refresh_commitments_incr",
|
||||||
"SELECT"
|
"SELECT"
|
||||||
@ -906,7 +906,8 @@ postgres_get_session (void *cls)
|
|||||||
" done=FALSE"
|
" done=FALSE"
|
||||||
" ORDER BY wire_deadline ASC"
|
" ORDER BY wire_deadline ASC"
|
||||||
" LIMIT "
|
" LIMIT "
|
||||||
TALER_EXCHANGEDB_MATCHING_DEPOSITS_LIMIT_STR ";",
|
TALER_QUOTE (
|
||||||
|
TALER_EXCHANGEDB_MATCHING_DEPOSITS_LIMIT) ";",
|
||||||
2),
|
2),
|
||||||
/* Used in #postgres_mark_deposit_tiny() */
|
/* Used in #postgres_mark_deposit_tiny() */
|
||||||
GNUNET_PQ_make_prepare ("mark_deposit_tiny",
|
GNUNET_PQ_make_prepare ("mark_deposit_tiny",
|
||||||
@ -1687,7 +1688,7 @@ struct DenomIteratorContext
|
|||||||
/**
|
/**
|
||||||
* Function to call with the results.
|
* Function to call with the results.
|
||||||
*/
|
*/
|
||||||
TALER_EXCHANGEDB_DenominationInfoIterator cb;
|
TALER_EXCHANGEDB_DenominationCallback cb;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Closure to pass to @e cb
|
* Closure to pass to @e cb
|
||||||
@ -1781,7 +1782,7 @@ domination_cb_helper (void *cls,
|
|||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_iterate_denomination_info (void *cls,
|
postgres_iterate_denomination_info (void *cls,
|
||||||
TALER_EXCHANGEDB_DenominationInfoIterator cb,
|
TALER_EXCHANGEDB_DenominationCallback cb,
|
||||||
void *cb_cls)
|
void *cb_cls)
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pc = cls;
|
struct PostgresClosure *pc = cls;
|
||||||
@ -1813,9 +1814,9 @@ postgres_iterate_denomination_info (void *cls,
|
|||||||
* @return transaction status
|
* @return transaction status
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_reserve_get (void *cls,
|
postgres_reserves_get (void *cls,
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
struct TALER_EXCHANGEDB_Reserve *reserve)
|
struct TALER_EXCHANGEDB_Reserve *reserve)
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
@ -1830,7 +1831,7 @@ postgres_reserve_get (void *cls,
|
|||||||
};
|
};
|
||||||
|
|
||||||
return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
|
return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
|
||||||
"reserve_get",
|
"reserves_get",
|
||||||
params,
|
params,
|
||||||
rs);
|
rs);
|
||||||
}
|
}
|
||||||
@ -1897,9 +1898,9 @@ postgres_reserves_in_insert (void *cls,
|
|||||||
struct GNUNET_TIME_Absolute expiry;
|
struct GNUNET_TIME_Absolute expiry;
|
||||||
|
|
||||||
reserve.pub = *reserve_pub;
|
reserve.pub = *reserve_pub;
|
||||||
reserve_exists = postgres_reserve_get (cls,
|
reserve_exists = postgres_reserves_get (cls,
|
||||||
session,
|
session,
|
||||||
&reserve);
|
&reserve);
|
||||||
if (0 > reserve_exists)
|
if (0 > reserve_exists)
|
||||||
{
|
{
|
||||||
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == reserve_exists);
|
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == reserve_exists);
|
||||||
@ -2141,9 +2142,9 @@ postgres_insert_withdraw_info (void *cls,
|
|||||||
/* update reserve balance */
|
/* update reserve balance */
|
||||||
reserve.pub = collectable->reserve_pub;
|
reserve.pub = collectable->reserve_pub;
|
||||||
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
(qs = postgres_reserve_get (cls,
|
(qs = postgres_reserves_get (cls,
|
||||||
session,
|
session,
|
||||||
&reserve)))
|
&reserve)))
|
||||||
{
|
{
|
||||||
/* Should have been checked before we got here... */
|
/* Should have been checked before we got here... */
|
||||||
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
|
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
|
||||||
@ -4664,7 +4665,8 @@ postgres_wire_lookup_deposit_wtid (void *cls,
|
|||||||
TALER_CoinSpendPublicKeyP *coin_pub,
|
TALER_CoinSpendPublicKeyP *coin_pub,
|
||||||
const struct
|
const struct
|
||||||
TALER_MerchantPublicKeyP *merchant_pub,
|
TALER_MerchantPublicKeyP *merchant_pub,
|
||||||
TALER_EXCHANGEDB_TrackTransactionCallback cb,
|
TALER_EXCHANGEDB_WireTransferByCoinCallback
|
||||||
|
cb,
|
||||||
void *cb_cls)
|
void *cb_cls)
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
@ -5086,9 +5088,9 @@ postgres_insert_reserve_closed (void *cls,
|
|||||||
/* update reserve balance */
|
/* update reserve balance */
|
||||||
reserve.pub = *reserve_pub;
|
reserve.pub = *reserve_pub;
|
||||||
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
(qs = postgres_reserve_get (cls,
|
(qs = postgres_reserves_get (cls,
|
||||||
session,
|
session,
|
||||||
&reserve)))
|
&reserve)))
|
||||||
{
|
{
|
||||||
/* Existence should have been checked before we got here... */
|
/* Existence should have been checked before we got here... */
|
||||||
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
|
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
|
||||||
@ -5658,13 +5660,13 @@ refreshs_serial_helper_cb (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_select_refreshs_above_serial_id (void *cls,
|
postgres_select_refreshes_above_serial_id (void *cls,
|
||||||
struct TALER_EXCHANGEDB_Session *
|
struct TALER_EXCHANGEDB_Session *
|
||||||
session,
|
session,
|
||||||
uint64_t serial_id,
|
uint64_t serial_id,
|
||||||
TALER_EXCHANGEDB_RefreshesCallback
|
TALER_EXCHANGEDB_RefreshesCallback
|
||||||
cb,
|
cb,
|
||||||
void *cb_cls)
|
void *cb_cls)
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
@ -6120,13 +6122,13 @@ reserves_out_serial_helper_cb (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_select_reserves_out_above_serial_id (void *cls,
|
postgres_select_withdrawals_above_serial_id (void *cls,
|
||||||
struct TALER_EXCHANGEDB_Session *
|
struct TALER_EXCHANGEDB_Session *
|
||||||
session,
|
session,
|
||||||
uint64_t serial_id,
|
uint64_t serial_id,
|
||||||
TALER_EXCHANGEDB_WithdrawCallback
|
TALER_EXCHANGEDB_WithdrawCallback
|
||||||
cb,
|
cb,
|
||||||
void *cb_cls)
|
void *cb_cls)
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
@ -6830,9 +6832,9 @@ postgres_insert_recoup_request (void *cls,
|
|||||||
|
|
||||||
/* Update reserve balance */
|
/* Update reserve balance */
|
||||||
reserve.pub = *reserve_pub;
|
reserve.pub = *reserve_pub;
|
||||||
qs = postgres_reserve_get (cls,
|
qs = postgres_reserves_get (cls,
|
||||||
session,
|
session,
|
||||||
&reserve);
|
&reserve);
|
||||||
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs)
|
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs)
|
||||||
{
|
{
|
||||||
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
|
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
|
||||||
@ -7281,7 +7283,7 @@ libtaler_plugin_exchangedb_postgres_init (void *cls)
|
|||||||
plugin->insert_denomination_info = &postgres_insert_denomination_info;
|
plugin->insert_denomination_info = &postgres_insert_denomination_info;
|
||||||
plugin->get_denomination_info = &postgres_get_denomination_info;
|
plugin->get_denomination_info = &postgres_get_denomination_info;
|
||||||
plugin->iterate_denomination_info = &postgres_iterate_denomination_info;
|
plugin->iterate_denomination_info = &postgres_iterate_denomination_info;
|
||||||
plugin->reserve_get = &postgres_reserve_get;
|
plugin->reserves_get = &postgres_reserves_get;
|
||||||
plugin->reserves_in_insert = &postgres_reserves_in_insert;
|
plugin->reserves_in_insert = &postgres_reserves_in_insert;
|
||||||
plugin->get_latest_reserve_in_reference =
|
plugin->get_latest_reserve_in_reference =
|
||||||
&postgres_get_latest_reserve_in_reference;
|
&postgres_get_latest_reserve_in_reference;
|
||||||
@ -7326,16 +7328,16 @@ libtaler_plugin_exchangedb_postgres_init (void *cls)
|
|||||||
plugin->gc = &postgres_gc;
|
plugin->gc = &postgres_gc;
|
||||||
plugin->select_deposits_above_serial_id
|
plugin->select_deposits_above_serial_id
|
||||||
= &postgres_select_deposits_above_serial_id;
|
= &postgres_select_deposits_above_serial_id;
|
||||||
plugin->select_refreshs_above_serial_id
|
plugin->select_refreshes_above_serial_id
|
||||||
= &postgres_select_refreshs_above_serial_id;
|
= &postgres_select_refreshes_above_serial_id;
|
||||||
plugin->select_refunds_above_serial_id
|
plugin->select_refunds_above_serial_id
|
||||||
= &postgres_select_refunds_above_serial_id;
|
= &postgres_select_refunds_above_serial_id;
|
||||||
plugin->select_reserves_in_above_serial_id
|
plugin->select_reserves_in_above_serial_id
|
||||||
= &postgres_select_reserves_in_above_serial_id;
|
= &postgres_select_reserves_in_above_serial_id;
|
||||||
plugin->select_reserves_in_above_serial_id_by_account
|
plugin->select_reserves_in_above_serial_id_by_account
|
||||||
= &postgres_select_reserves_in_above_serial_id_by_account;
|
= &postgres_select_reserves_in_above_serial_id_by_account;
|
||||||
plugin->select_reserves_out_above_serial_id
|
plugin->select_withdrawals_above_serial_id
|
||||||
= &postgres_select_reserves_out_above_serial_id;
|
= &postgres_select_withdrawals_above_serial_id;
|
||||||
plugin->select_wire_out_above_serial_id
|
plugin->select_wire_out_above_serial_id
|
||||||
= &postgres_select_wire_out_above_serial_id;
|
= &postgres_select_wire_out_above_serial_id;
|
||||||
plugin->select_wire_out_above_serial_id_by_account
|
plugin->select_wire_out_above_serial_id_by_account
|
||||||
|
@ -163,9 +163,9 @@ check_reserve (struct TALER_EXCHANGEDB_Session *session,
|
|||||||
|
|
||||||
reserve.pub = *pub;
|
reserve.pub = *pub;
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->reserve_get (plugin->cls,
|
plugin->reserves_get (plugin->cls,
|
||||||
session,
|
session,
|
||||||
&reserve));
|
&reserve));
|
||||||
FAILIF (value != reserve.balance.value);
|
FAILIF (value != reserve.balance.value);
|
||||||
FAILIF (fraction != reserve.balance.fraction);
|
FAILIF (fraction != reserve.balance.fraction);
|
||||||
FAILIF (0 != strcmp (currency, reserve.balance.currency));
|
FAILIF (0 != strcmp (currency, reserve.balance.currency));
|
||||||
@ -572,14 +572,14 @@ test_melting (struct TALER_EXCHANGEDB_Session *session)
|
|||||||
GNUNET_memcmp (&refresh_session.coin.denom_pub_hash,
|
GNUNET_memcmp (&refresh_session.coin.denom_pub_hash,
|
||||||
&ret_refresh_session.session.coin.denom_pub_hash));
|
&ret_refresh_session.session.coin.denom_pub_hash));
|
||||||
|
|
||||||
/* test 'select_refreshs_above_serial_id' */
|
/* test 'select_refreshes_above_serial_id' */
|
||||||
auditor_row_cnt = 0;
|
auditor_row_cnt = 0;
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->select_refreshs_above_serial_id (plugin->cls,
|
plugin->select_refreshes_above_serial_id (plugin->cls,
|
||||||
session,
|
session,
|
||||||
0,
|
0,
|
||||||
&audit_refresh_session_cb,
|
&audit_refresh_session_cb,
|
||||||
NULL));
|
NULL));
|
||||||
FAILIF (1 != auditor_row_cnt);
|
FAILIF (1 != auditor_row_cnt);
|
||||||
|
|
||||||
new_dkp = GNUNET_new_array (MELT_NEW_COINS,
|
new_dkp = GNUNET_new_array (MELT_NEW_COINS,
|
||||||
@ -1776,11 +1776,11 @@ run (void *cls)
|
|||||||
&audit_reserve_in_cb,
|
&audit_reserve_in_cb,
|
||||||
NULL));
|
NULL));
|
||||||
FAILIF (0 >=
|
FAILIF (0 >=
|
||||||
plugin->select_reserves_out_above_serial_id (plugin->cls,
|
plugin->select_withdrawals_above_serial_id (plugin->cls,
|
||||||
session,
|
session,
|
||||||
0,
|
0,
|
||||||
&audit_reserve_out_cb,
|
&audit_reserve_out_cb,
|
||||||
NULL));
|
NULL));
|
||||||
FAILIF (3 != auditor_row_cnt);
|
FAILIF (3 != auditor_row_cnt);
|
||||||
|
|
||||||
/* Tests for deposits */
|
/* Tests for deposits */
|
||||||
|
@ -379,7 +379,7 @@ struct TALER_EXCHANGEDB_RecoupRefreshListEntry
|
|||||||
struct TALER_CoinSpendSignatureP coin_sig;
|
struct TALER_CoinSpendSignatureP coin_sig;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Public key of the old coin that the refresh'ed coin was paid back to.
|
* Public key of the old coin that the refreshed coin was paid back to.
|
||||||
*/
|
*/
|
||||||
struct TALER_CoinSpendPublicKeyP old_coin_pub;
|
struct TALER_CoinSpendPublicKeyP old_coin_pub;
|
||||||
|
|
||||||
@ -1276,16 +1276,17 @@ typedef void
|
|||||||
* when we expect it to be done (if @a wtid was NULL)
|
* when we expect it to be done (if @a wtid was NULL)
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*TALER_EXCHANGEDB_TrackTransactionCallback)(void *cls,
|
(*TALER_EXCHANGEDB_WireTransferByCoinCallback)(void *cls,
|
||||||
const struct
|
const struct
|
||||||
TALER_WireTransferIdentifierRawP *
|
TALER_WireTransferIdentifierRawP
|
||||||
wtid,
|
*
|
||||||
const struct
|
wtid,
|
||||||
TALER_Amount *coin_contribution,
|
const struct
|
||||||
const struct
|
TALER_Amount *coin_contribution,
|
||||||
TALER_Amount *coin_fee,
|
const struct
|
||||||
struct GNUNET_TIME_Absolute
|
TALER_Amount *coin_fee,
|
||||||
execution_time);
|
struct GNUNET_TIME_Absolute
|
||||||
|
execution_time);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1547,13 +1548,12 @@ typedef void
|
|||||||
* @param issue detailed information about the denomination (value, expiration times, fees)
|
* @param issue detailed information about the denomination (value, expiration times, fees)
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*TALER_EXCHANGEDB_DenominationInfoIterator)(void *cls,
|
(*TALER_EXCHANGEDB_DenominationCallback)(void *cls,
|
||||||
const struct
|
const struct
|
||||||
TALER_DenominationPublicKey *
|
TALER_DenominationPublicKey *denom_pub,
|
||||||
denom_pub,
|
const struct
|
||||||
const struct
|
TALER_EXCHANGEDB_DenominationKeyInformationP
|
||||||
TALER_EXCHANGEDB_DenominationKeyInformationP
|
*issue);
|
||||||
*issue);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1575,7 +1575,7 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
char *library_name;
|
char *library_name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the thread-local database-handle.
|
* Get the thread-local (!) database-handle.
|
||||||
* Connect to the db if the connection does not exist yet.
|
* Connect to the db if the connection does not exist yet.
|
||||||
*
|
*
|
||||||
* @param cls the @e cls of this struct with the plugin-specific state
|
* @param cls the @e cls of this struct with the plugin-specific state
|
||||||
@ -1705,7 +1705,7 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*iterate_denomination_info)(void *cls,
|
(*iterate_denomination_info)(void *cls,
|
||||||
TALER_EXCHANGEDB_DenominationInfoIterator cb,
|
TALER_EXCHANGEDB_DenominationCallback cb,
|
||||||
void *cb_cls);
|
void *cb_cls);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1719,9 +1719,9 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
* @return transaction status
|
* @return transaction status
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*reserve_get)(void *cls,
|
(*reserves_get)(void *cls,
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
struct TALER_EXCHANGEDB_Reserve *reserve);
|
struct TALER_EXCHANGEDB_Reserve *reserve);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1750,6 +1750,7 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Obtain the most recent @a wire_reference that was inserted via @e reserves_in_insert.
|
* Obtain the most recent @a wire_reference that was inserted via @e reserves_in_insert.
|
||||||
|
* Used by the wirewatch process when resuming.
|
||||||
*
|
*
|
||||||
* @param cls the @e cls of this struct with the plugin-specific state
|
* @param cls the @e cls of this struct with the plugin-specific state
|
||||||
* @param session the database connection handle
|
* @param session the database connection handle
|
||||||
@ -1766,8 +1767,9 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Locate the response for a /withdraw request under the
|
* Locate the response for a withdraw request under the
|
||||||
* key of the hash of the blinded message.
|
* key of the hash of the blinded message. Used to ensure
|
||||||
|
* idempotency of the request.
|
||||||
*
|
*
|
||||||
* @param cls the @e cls of this struct with the plugin-specific state
|
* @param cls the @e cls of this struct with the plugin-specific state
|
||||||
* @param session database connection to use
|
* @param session database connection to use
|
||||||
@ -1785,8 +1787,8 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store collectable bit coin under the corresponding
|
* Store collectable coin under the corresponding hash of the blinded
|
||||||
* hash of the blinded message.
|
* message.
|
||||||
*
|
*
|
||||||
* @param cls the @e cls of this struct with the plugin-specific state
|
* @param cls the @e cls of this struct with the plugin-specific state
|
||||||
* @param session database connection to use
|
* @param session database connection to use
|
||||||
@ -1933,6 +1935,7 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
struct TALER_EXCHANGEDB_Session *session,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
const struct TALER_EXCHANGEDB_Refund *refund);
|
const struct TALER_EXCHANGEDB_Refund *refund);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Select refunds by @a coin_pub, @a merchant_pub and @a h_contract.
|
* Select refunds by @a coin_pub, @a merchant_pub and @a h_contract.
|
||||||
*
|
*
|
||||||
@ -1956,9 +1959,9 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mark a deposit as tiny, thereby declaring that it cannot be
|
* Mark a deposit as tiny, thereby declaring that it cannot be executed by
|
||||||
* executed by itself and should no longer be returned by
|
* itself (only included in a larger aggregation) and should no longer be
|
||||||
* @e iterate_ready_deposits()
|
* returned by @e iterate_ready_deposits()
|
||||||
*
|
*
|
||||||
* @param cls the @e cls of this struct with the plugin-specific state
|
* @param cls the @e cls of this struct with the plugin-specific state
|
||||||
* @param session connection to the database
|
* @param session connection to the database
|
||||||
@ -2037,7 +2040,6 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
* "tiny" threshold beyond which we never trigger a wire transaction!
|
* "tiny" threshold beyond which we never trigger a wire transaction!
|
||||||
*/
|
*/
|
||||||
#define TALER_EXCHANGEDB_MATCHING_DEPOSITS_LIMIT 10000
|
#define TALER_EXCHANGEDB_MATCHING_DEPOSITS_LIMIT 10000
|
||||||
#define TALER_EXCHANGEDB_MATCHING_DEPOSITS_LIMIT_STR "10000"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Obtain information about other pending deposits for the same
|
* Obtain information about other pending deposits for the same
|
||||||
@ -2067,7 +2069,7 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store new refresh melt commitment data.
|
* Store new melt commitment data.
|
||||||
*
|
*
|
||||||
* @param cls the @e cls of this struct with the plugin-specific state
|
* @param cls the @e cls of this struct with the plugin-specific state
|
||||||
* @param session database handle to use
|
* @param session database handle to use
|
||||||
@ -2081,7 +2083,7 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lookup refresh melt commitment data under the given @a rc.
|
* Lookup melt commitment data under the given @a rc.
|
||||||
*
|
*
|
||||||
* @param cls the @e cls of this struct with the plugin-specific state
|
* @param cls the @e cls of this struct with the plugin-specific state
|
||||||
* @param session database handle to use
|
* @param session database handle to use
|
||||||
@ -2256,7 +2258,7 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
||||||
const struct
|
const struct
|
||||||
TALER_MerchantPublicKeyP *merchant_pub,
|
TALER_MerchantPublicKeyP *merchant_pub,
|
||||||
TALER_EXCHANGEDB_TrackTransactionCallback cb,
|
TALER_EXCHANGEDB_WireTransferByCoinCallback cb,
|
||||||
void *cb_cls);
|
void *cb_cls);
|
||||||
|
|
||||||
|
|
||||||
@ -2500,11 +2502,11 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*select_refreshs_above_serial_id)(void *cls,
|
(*select_refreshes_above_serial_id)(void *cls,
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
uint64_t serial_id,
|
uint64_t serial_id,
|
||||||
TALER_EXCHANGEDB_RefreshesCallback cb,
|
TALER_EXCHANGEDB_RefreshesCallback cb,
|
||||||
void *cb_cls);
|
void *cb_cls);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2580,12 +2582,12 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*select_reserves_out_above_serial_id)(void *cls,
|
(*select_withdrawals_above_serial_id)(void *cls,
|
||||||
struct TALER_EXCHANGEDB_Session *
|
struct TALER_EXCHANGEDB_Session *
|
||||||
session,
|
session,
|
||||||
uint64_t serial_id,
|
uint64_t serial_id,
|
||||||
TALER_EXCHANGEDB_WithdrawCallback cb,
|
TALER_EXCHANGEDB_WithdrawCallback cb,
|
||||||
void *cb_cls);
|
void *cb_cls);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function called to select outgoing wire transfers the exchange
|
* Function called to select outgoing wire transfers the exchange
|
||||||
|
@ -26,6 +26,22 @@
|
|||||||
#include "taler_amount_lib.h"
|
#include "taler_amount_lib.h"
|
||||||
#include "taler_crypto_lib.h"
|
#include "taler_crypto_lib.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stringify operator.
|
||||||
|
*
|
||||||
|
* @param a some expression to stringify. Must NOT be a macro.
|
||||||
|
* @return same expression as a constant string.
|
||||||
|
*/
|
||||||
|
#define TALER_S(a) #a
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stringify operator.
|
||||||
|
*
|
||||||
|
* @param a some expression to stringify. Can be a macro.
|
||||||
|
* @return macro-expanded expression as a constant string.
|
||||||
|
*/
|
||||||
|
#define TALER_QUOTE(a) TALER_S (a)
|
||||||
|
|
||||||
|
|
||||||
/* Define logging functions */
|
/* Define logging functions */
|
||||||
#define TALER_LOG_DEBUG(...) \
|
#define TALER_LOG_DEBUG(...) \
|
||||||
|
Loading…
Reference in New Issue
Block a user