migrating auditordb to new API to address #5010
This commit is contained in:
parent
c42d544736
commit
560051e6b0
File diff suppressed because it is too large
Load Diff
@ -70,7 +70,9 @@ select_denomination_info_result (void *cls,
|
||||
{
|
||||
const struct TALER_DenominationKeyValidityPS *issue1 = cls;
|
||||
|
||||
if (0 != memcmp (issue1, issue2, sizeof (*issue2)))
|
||||
if (0 != memcmp (issue1,
|
||||
issue2,
|
||||
sizeof (*issue2)))
|
||||
{
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||
"select_denomination_info_result: issue does not match\n");
|
||||
@ -202,11 +204,11 @@ run (void *cls)
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||
"Test: select_denomination_info\n");
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (0 >=
|
||||
plugin->select_denomination_info (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
select_denomination_info_result,
|
||||
&select_denomination_info_result,
|
||||
&issue));
|
||||
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||
@ -229,7 +231,7 @@ run (void *cls)
|
||||
.last_wire_out_serial_id = 0
|
||||
};
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->insert_auditor_progress (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
@ -244,7 +246,7 @@ run (void *cls)
|
||||
pp.last_refund_serial_id++;
|
||||
pp.last_wire_out_serial_id++;
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->update_auditor_progress (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
@ -253,7 +255,7 @@ run (void *cls)
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||
"Test: get_auditor_progress\n");
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->get_auditor_progress (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
@ -278,7 +280,7 @@ run (void *cls)
|
||||
TALER_string_to_amount (CURRENCY ":23.456789",
|
||||
&withdraw_fee_balance));
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->insert_reserve_info (plugin->cls,
|
||||
session,
|
||||
&reserve_pub,
|
||||
@ -290,7 +292,7 @@ run (void *cls)
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||
"Test: update_reserve_info\n");
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->update_reserve_info (plugin->cls,
|
||||
session,
|
||||
&reserve_pub,
|
||||
@ -302,7 +304,7 @@ run (void *cls)
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||
"Test: get_reserve_info\n");
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->get_reserve_info (plugin->cls,
|
||||
session,
|
||||
&reserve_pub,
|
||||
@ -319,7 +321,7 @@ run (void *cls)
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||
"Test: insert_reserve_summary\n");
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->insert_reserve_summary (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
@ -329,7 +331,7 @@ run (void *cls)
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||
"Test: update_reserve_summary\n");
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->update_reserve_summary (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
@ -342,22 +344,33 @@ run (void *cls)
|
||||
ZR_BLK (&reserve_balance2);
|
||||
ZR_BLK (&withdraw_fee_balance2);
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->get_reserve_summary (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
&reserve_balance2,
|
||||
&withdraw_fee_balance2));
|
||||
|
||||
FAILIF (0 != memcmp (&reserve_balance2, &reserve_balance, sizeof (reserve_balance))
|
||||
|| 0 != memcmp (&withdraw_fee_balance2, &withdraw_fee_balance, sizeof (withdraw_fee_balance)));
|
||||
|
||||
FAILIF ( (0 != memcmp (&reserve_balance2,
|
||||
&reserve_balance,
|
||||
sizeof (reserve_balance)) ||
|
||||
(0 != memcmp (&withdraw_fee_balance2,
|
||||
&withdraw_fee_balance,
|
||||
sizeof (withdraw_fee_balance))) ) );
|
||||
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||
"Test: insert_denomination_balance\n");
|
||||
|
||||
struct TALER_Amount denom_balance, deposit_fee_balance, melt_fee_balance, refund_fee_balance;
|
||||
struct TALER_Amount denom_balance2, deposit_fee_balance2, melt_fee_balance2, refund_fee_balance2;
|
||||
struct TALER_Amount rbalance, rbalance2;
|
||||
struct TALER_Amount denom_balance;
|
||||
struct TALER_Amount deposit_fee_balance;
|
||||
struct TALER_Amount melt_fee_balance;
|
||||
struct TALER_Amount refund_fee_balance;
|
||||
struct TALER_Amount denom_balance2;
|
||||
struct TALER_Amount deposit_fee_balance2;
|
||||
struct TALER_Amount melt_fee_balance2;
|
||||
struct TALER_Amount refund_fee_balance2;
|
||||
struct TALER_Amount rbalance;
|
||||
struct TALER_Amount rbalance2;
|
||||
|
||||
GNUNET_assert (GNUNET_OK ==
|
||||
TALER_string_to_amount (CURRENCY ":12.345678",
|
||||
@ -375,7 +388,7 @@ run (void *cls)
|
||||
TALER_string_to_amount (CURRENCY ":13.57986",
|
||||
&rbalance));
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->insert_denomination_balance (plugin->cls,
|
||||
session,
|
||||
&denom_pub_hash,
|
||||
@ -390,7 +403,7 @@ run (void *cls)
|
||||
pp.last_melt_serial_id++;
|
||||
pp.last_refund_serial_id++;
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->update_denomination_balance (plugin->cls,
|
||||
session,
|
||||
&denom_pub_hash,
|
||||
@ -399,7 +412,7 @@ run (void *cls)
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||
"Test: get_denomination_balance\n");
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->get_denomination_balance (plugin->cls,
|
||||
session,
|
||||
&denom_pub_hash,
|
||||
@ -413,7 +426,7 @@ run (void *cls)
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||
"Test: insert_balance_summary\n");
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->insert_balance_summary (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
@ -426,7 +439,7 @@ run (void *cls)
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||
"Test: update_balance_summary\n");
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->update_balance_summary (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
@ -445,7 +458,7 @@ run (void *cls)
|
||||
ZR_BLK (&refund_fee_balance2);
|
||||
ZR_BLK (&rbalance2);
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->get_balance_summary (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
@ -455,17 +468,27 @@ run (void *cls)
|
||||
&refund_fee_balance2,
|
||||
&rbalance2));
|
||||
|
||||
FAILIF (0 != memcmp (&denom_balance2, &denom_balance, sizeof (denom_balance))
|
||||
|| 0 != memcmp (&deposit_fee_balance2, &deposit_fee_balance, sizeof (deposit_fee_balance))
|
||||
|| 0 != memcmp (&melt_fee_balance2, &melt_fee_balance, sizeof (melt_fee_balance))
|
||||
|| 0 != memcmp (&refund_fee_balance2, &refund_fee_balance, sizeof (refund_fee_balance)));
|
||||
FAILIF (0 != memcmp (&rbalance2, &rbalance, sizeof (rbalance)));
|
||||
FAILIF ( (0 != memcmp (&denom_balance2,
|
||||
&denom_balance,
|
||||
sizeof (denom_balance)) ) ||
|
||||
(0 != memcmp (&deposit_fee_balance2,
|
||||
&deposit_fee_balance,
|
||||
sizeof (deposit_fee_balance)) ) ||
|
||||
(0 != memcmp (&melt_fee_balance2,
|
||||
&melt_fee_balance,
|
||||
sizeof (melt_fee_balance)) ) ||
|
||||
(0 != memcmp (&refund_fee_balance2,
|
||||
&refund_fee_balance,
|
||||
sizeof (refund_fee_balance))) );
|
||||
FAILIF (0 != memcmp (&rbalance2,
|
||||
&rbalance,
|
||||
sizeof (rbalance)));
|
||||
|
||||
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||
"Test: insert_historic_denom_revenue\n");
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->insert_historic_denom_revenue (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
@ -473,7 +496,7 @@ run (void *cls)
|
||||
past,
|
||||
&rbalance));
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->insert_historic_denom_revenue (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
@ -511,17 +534,17 @@ run (void *cls)
|
||||
return GNUNET_OK;
|
||||
}
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (0 >=
|
||||
plugin->select_historic_denom_revenue (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
select_historic_denom_revenue_result,
|
||||
&select_historic_denom_revenue_result,
|
||||
NULL));
|
||||
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||
"Test: insert_historic_losses\n");
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->insert_historic_losses (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
@ -529,7 +552,7 @@ run (void *cls)
|
||||
past,
|
||||
&rbalance));
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->insert_historic_losses (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
@ -568,7 +591,7 @@ run (void *cls)
|
||||
return GNUNET_OK;
|
||||
}
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (0 >=
|
||||
plugin->select_historic_losses (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
@ -583,7 +606,7 @@ run (void *cls)
|
||||
TALER_string_to_amount (CURRENCY ":56.789012",
|
||||
&reserve_profits));
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->insert_historic_reserve_revenue (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
@ -591,7 +614,7 @@ run (void *cls)
|
||||
future,
|
||||
&reserve_profits));
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->insert_historic_reserve_revenue (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
@ -628,7 +651,7 @@ run (void *cls)
|
||||
return GNUNET_OK;
|
||||
}
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (0 >=
|
||||
plugin->select_historic_reserve_revenue (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
@ -638,7 +661,7 @@ run (void *cls)
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||
"Test: insert_predicted_result\n");
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->insert_predicted_result (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
@ -651,18 +674,18 @@ run (void *cls)
|
||||
TALER_string_to_amount (CURRENCY ":78.901234",
|
||||
&rbalance));
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->update_predicted_result (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
&rbalance));
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->insert_wire_fee_summary (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
&rbalance));
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->update_wire_fee_summary (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
@ -670,7 +693,7 @@ run (void *cls)
|
||||
{
|
||||
struct TALER_Amount rprof;
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->get_wire_fee_summary (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
@ -679,7 +702,7 @@ run (void *cls)
|
||||
TALER_amount_cmp (&rprof,
|
||||
&reserve_profits));
|
||||
}
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (0 >
|
||||
plugin->commit (plugin->cls,
|
||||
session));
|
||||
|
||||
@ -691,13 +714,13 @@ run (void *cls)
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||
"Test: get_predicted_balance\n");
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->get_predicted_balance (plugin->cls,
|
||||
session,
|
||||
&master_pub,
|
||||
&rbalance2));
|
||||
|
||||
FAILIF (GNUNET_OK !=
|
||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||
plugin->del_reserve_info (plugin->cls,
|
||||
session,
|
||||
&reserve_pub,
|
||||
|
@ -425,7 +425,6 @@ postgres_create_tables (void *cls)
|
||||
GNUNET_PQ_make_try_execute("CREATE INDEX prepare_iteration_index "
|
||||
"ON prewire(type,finished);"),
|
||||
GNUNET_PQ_EXECUTE_STATEMENT_END
|
||||
|
||||
};
|
||||
PGconn *conn;
|
||||
int ret;
|
||||
@ -1421,6 +1420,7 @@ postgres_prepare (PGconn *db_conn)
|
||||
",timestamp"
|
||||
",denoms.denom_pub"
|
||||
",coins.denom_sig"
|
||||
|
||||
" FROM payback"
|
||||
" JOIN known_coins coins"
|
||||
" USING (coin_pub)"
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include <jansson.h>
|
||||
#include <gnunet/gnunet_util_lib.h>
|
||||
#include <gnunet/gnunet_db_lib.h>
|
||||
#include "taler_auditordb_lib.h"
|
||||
#include "taler_signatures.h"
|
||||
|
||||
@ -236,10 +237,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
*
|
||||
* @param cls the @e cls of this struct with the plugin-specific state
|
||||
* @param session connection to use
|
||||
* @return #GNUNET_OK on success, #GNUNET_NO if the transaction
|
||||
* can be retried, #GNUNET_SYSERR on hard failures
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*commit) (void *cls,
|
||||
struct TALER_AUDITORDB_Session *session);
|
||||
|
||||
@ -291,9 +291,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param master_pub master public key of the exchange
|
||||
* @param cb function to call with the results
|
||||
* @param cb_cls closure for @a cb
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*select_denomination_info)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
@ -309,9 +309,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param session connection to use
|
||||
* @param master_pub master key of the exchange
|
||||
* @param pp where is the auditor in processing
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*insert_auditor_progress)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
@ -326,9 +326,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param session connection to use
|
||||
* @param master_pub master key of the exchange
|
||||
* @param pp where is the auditor in processing
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*update_auditor_progress)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
@ -342,10 +342,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param session connection to use
|
||||
* @param master_pub master key of the exchange
|
||||
* @param[out] pp set to where the auditor is in processing
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure;
|
||||
* #GNUNET_NO if we have no records for the @a master_pub
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*get_auditor_progress)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
@ -364,9 +363,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param withdraw_fee_balance amount the exchange gained in withdraw fees
|
||||
* due to withdrawals from this reserve
|
||||
* @param expiration_date expiration date of the reserve
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*insert_reserve_info)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_ReservePublicKeyP *reserve_pub,
|
||||
@ -388,9 +387,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param withdraw_fee_balance amount the exchange gained in withdraw fees
|
||||
* due to withdrawals from this reserve
|
||||
* @param expiration_date expiration date of the reserve
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*update_reserve_info)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_ReservePublicKeyP *reserve_pub,
|
||||
@ -412,10 +411,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param[out] withdraw_fee_balance amount the exchange gained in withdraw fees
|
||||
* due to withdrawals from this reserve
|
||||
* @param[out] expiration_date expiration date of the reserve
|
||||
* @return #GNUNET_OK on success; #GNUNET_NO if there is no known
|
||||
* record about this reserve; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*get_reserve_info)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_ReservePublicKeyP *reserve_pub,
|
||||
@ -433,10 +431,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param session connection to use
|
||||
* @param reserve_pub public key of the reserve
|
||||
* @param master_pub master public key of the exchange
|
||||
* @return #GNUNET_OK on success; #GNUNET_NO if there is no known
|
||||
* record about this reserve; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*del_reserve_info)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_ReservePublicKeyP *reserve_pub,
|
||||
@ -453,9 +450,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param reserve_balance amount stored in the reserve
|
||||
* @param withdraw_fee_balance amount the exchange gained in withdraw fees
|
||||
* due to withdrawals from this reserve
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*insert_reserve_summary)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
@ -473,9 +470,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param reserve_balance amount stored in the reserve
|
||||
* @param withdraw_fee_balance amount the exchange gained in withdraw fees
|
||||
* due to withdrawals from this reserve
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*update_reserve_summary)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
@ -492,10 +489,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param[out] reserve_balance amount stored in the reserve
|
||||
* @param[out] withdraw_fee_balance amount the exchange gained in withdraw fees
|
||||
* due to withdrawals from this reserve
|
||||
* @return #GNUNET_OK on success; #GNUNET_NO if there is no known
|
||||
* record about this exchange; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*get_reserve_summary)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
@ -511,9 +507,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param session connection to use
|
||||
* @param master_pub master public key of the exchange
|
||||
* @param wire_fee_balance amount the exchange gained in wire fees
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*insert_wire_fee_summary)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
@ -528,9 +524,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param session connection to use
|
||||
* @param master_pub master public key of the exchange
|
||||
* @param wire_fee_balance amount the exchange gained in wire fees
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*update_wire_fee_summary)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
@ -544,10 +540,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param session connection to use
|
||||
* @param master_pub master public key of the exchange
|
||||
* @param[out] wire_fee_balance set amount the exchange gained in wire fees
|
||||
* @return #GNUNET_OK on success; #GNUNET_NO if there is no known
|
||||
* record about this exchange; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*get_wire_fee_summary)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
@ -563,9 +558,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param denom_pub_hash hash of the denomination public key
|
||||
* @param denom_balance value of coins outstanding with this denomination key
|
||||
* @param denom_risk value of coins issued with this denomination key
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*insert_denomination_balance)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct GNUNET_HashCode *denom_pub_hash,
|
||||
@ -582,9 +577,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param denom_pub_hash hash of the denomination public key
|
||||
* @param denom_balance value of coins outstanding with this denomination key
|
||||
* @param denom_risk value of coins issued with this denomination key
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*update_denomination_balance)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct GNUNET_HashCode *denom_pub_hash,
|
||||
@ -600,9 +595,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param denom_pub_hash hash of the denomination public key
|
||||
* @param[out] denom_balance value of coins outstanding with this denomination key
|
||||
* @param[out] denom_risk value of coins issued with this denomination key
|
||||
* @return #GNUNET_OK on success; #GNUNET_NO if no record found, #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*get_denomination_balance)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct GNUNET_HashCode *denom_pub_hash,
|
||||
@ -616,9 +611,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param cls the @e cls of this struct with the plugin-specific state
|
||||
* @param session connection to use
|
||||
* @param denom_pub_hash hash of the denomination public key
|
||||
* @return #GNUNET_OK on success; #GNUNET_NO if no record found, #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*del_denomination_balance)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct GNUNET_HashCode *denom_pub_hash);
|
||||
@ -636,9 +631,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param melt_fee_balance total melt fees collected for this DK
|
||||
* @param refund_fee_balance total refund fees collected for this DK
|
||||
* @param risk maximum risk exposure of the exchange
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*insert_balance_summary)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
@ -661,9 +656,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param melt_fee_balance total melt fees collected for this DK
|
||||
* @param refund_fee_balance total refund fees collected for this DK
|
||||
* @param risk maximum risk exposure of the exchange
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*update_balance_summary)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
@ -685,10 +680,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param[out] melt_fee_balance total melt fees collected for this DK
|
||||
* @param[out] refund_fee_balance total refund fees collected for this DK
|
||||
* @param[out] risk maximum risk exposure of the exchange
|
||||
* @return #GNUNET_OK on success; #GNUNET_NO if there is no entry
|
||||
* for this @a master_pub; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*get_balance_summary)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
@ -711,9 +705,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param revenue_balance what was the total profit made from
|
||||
* deposit fees, melting fees, refresh fees
|
||||
* and coins that were never returned?
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*insert_historic_denom_revenue)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
@ -731,9 +725,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param master_pub master key of the exchange
|
||||
* @param cb function to call with the results
|
||||
* @param cb_cls closure for @a cb
|
||||
* @return #GNUNET_OK on success, #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*select_historic_denom_revenue)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
@ -754,9 +748,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param denom_pub_hash hash of the denomination key
|
||||
* @param loss_timestamp when did this profit get realized
|
||||
* @param loss_balance what was the total loss
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*insert_historic_losses)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
@ -773,9 +767,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param master_pub master key of the exchange
|
||||
* @param cb function to call with the results
|
||||
* @param cb_cls closure for @a cb
|
||||
* @return #GNUNET_OK on success, #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*select_historic_losses)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
@ -792,9 +786,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param start_time beginning of aggregated time interval
|
||||
* @param end_time end of aggregated time interval
|
||||
* @param reserve_profits total profits made
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*insert_historic_reserve_revenue)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
@ -811,9 +805,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param master_pub master key of the exchange
|
||||
* @param cb function to call with results
|
||||
* @param cb_cls closure for @a cb
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*select_historic_reserve_revenue)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
@ -830,9 +824,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param session connection to use
|
||||
* @param master_pub master key of the exchange
|
||||
* @param balance what the bank account balance of the exchange should show
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*insert_predicted_result)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
@ -847,9 +841,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param session connection to use
|
||||
* @param master_pub master key of the exchange
|
||||
* @param balance what the bank account balance of the exchange should show
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*update_predicted_result)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
@ -863,10 +857,9 @@ struct TALER_AUDITORDB_Plugin
|
||||
* @param session connection to use
|
||||
* @param master_pub master key of the exchange
|
||||
* @param[out] balance expected bank account balance of the exchange
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure;
|
||||
* #GNUNET_NO if we have no records for the @a master_pub
|
||||
* @return transaction status code
|
||||
*/
|
||||
int
|
||||
enum GNUNET_DB_QueryStatus
|
||||
(*get_predicted_balance)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
|
Loading…
Reference in New Issue
Block a user