-remove sessions also from auditor
This commit is contained in:
parent
82a5038acf
commit
01e06eb715
@ -46,11 +46,6 @@ const struct GNUNET_CONFIGURATION_Handle *TALER_ARL_cfg;
|
|||||||
*/
|
*/
|
||||||
struct TALER_AUDITORDB_Plugin *TALER_ARL_adb;
|
struct TALER_AUDITORDB_Plugin *TALER_ARL_adb;
|
||||||
|
|
||||||
/**
|
|
||||||
* Our session with the #TALER_ARL_adb.
|
|
||||||
*/
|
|
||||||
struct TALER_AUDITORDB_Session *TALER_ARL_asession;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Master public key of the exchange to audit.
|
* Master public key of the exchange to audit.
|
||||||
*/
|
*/
|
||||||
@ -310,8 +305,7 @@ transact (TALER_ARL_Analysis analysis,
|
|||||||
int ret;
|
int ret;
|
||||||
enum GNUNET_DB_QueryStatus qs;
|
enum GNUNET_DB_QueryStatus qs;
|
||||||
|
|
||||||
ret = TALER_ARL_adb->start (TALER_ARL_adb->cls,
|
ret = TALER_ARL_adb->start (TALER_ARL_adb->cls);
|
||||||
TALER_ARL_asession);
|
|
||||||
if (GNUNET_OK != ret)
|
if (GNUNET_OK != ret)
|
||||||
{
|
{
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
@ -340,13 +334,11 @@ transact (TALER_ARL_Analysis analysis,
|
|||||||
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
|
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"Exchange DB commit failed, rolling back transaction\n");
|
"Exchange DB commit failed, rolling back transaction\n");
|
||||||
TALER_ARL_adb->rollback (TALER_ARL_adb->cls,
|
TALER_ARL_adb->rollback (TALER_ARL_adb->cls);
|
||||||
TALER_ARL_asession);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qs = TALER_ARL_adb->commit (TALER_ARL_adb->cls,
|
qs = TALER_ARL_adb->commit (TALER_ARL_adb->cls);
|
||||||
TALER_ARL_asession);
|
|
||||||
if (0 > qs)
|
if (0 > qs)
|
||||||
{
|
{
|
||||||
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
|
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
|
||||||
@ -359,8 +351,7 @@ transact (TALER_ARL_Analysis analysis,
|
|||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
||||||
"Processing failed (or no changes), rolling back transaction\n");
|
"Processing failed (or no changes), rolling back transaction\n");
|
||||||
TALER_ARL_adb->rollback (TALER_ARL_adb->cls,
|
TALER_ARL_adb->rollback (TALER_ARL_adb->cls);
|
||||||
TALER_ARL_asession);
|
|
||||||
TALER_ARL_edb->rollback (TALER_ARL_edb->cls);
|
TALER_ARL_edb->rollback (TALER_ARL_edb->cls);
|
||||||
}
|
}
|
||||||
switch (qs)
|
switch (qs)
|
||||||
@ -389,15 +380,15 @@ int
|
|||||||
TALER_ARL_setup_sessions_and_run (TALER_ARL_Analysis ana,
|
TALER_ARL_setup_sessions_and_run (TALER_ARL_Analysis ana,
|
||||||
void *ana_cls)
|
void *ana_cls)
|
||||||
{
|
{
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_SYSERR ==
|
||||||
TALER_ARL_edb->preflight (TALER_ARL_edb->cls))
|
TALER_ARL_edb->preflight (TALER_ARL_edb->cls))
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"Failed to initialize exchange connection.\n");
|
"Failed to initialize exchange connection.\n");
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
}
|
}
|
||||||
TALER_ARL_asession = TALER_ARL_adb->get_session (TALER_ARL_adb->cls);
|
if (GNUNET_SYSERR ==
|
||||||
if (NULL == TALER_ARL_asession)
|
TALER_ARL_adb->preflight (TALER_ARL_adb->cls))
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"Failed to initialize auditor session.\n");
|
"Failed to initialize auditor session.\n");
|
||||||
@ -804,11 +795,10 @@ TALER_ARL_init (const struct GNUNET_CONFIGURATION_Handle *c)
|
|||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
struct TALER_AUDITORDB_Session *as;
|
|
||||||
int found;
|
int found;
|
||||||
|
|
||||||
as = TALER_ARL_adb->get_session (TALER_ARL_adb->cls);
|
if (GNUNET_SYSERR ==
|
||||||
if (NULL == as)
|
TALER_ARL_adb->preflight (TALER_ARL_adb->cls))
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"Failed to start session with auditor database.\n");
|
"Failed to start session with auditor database.\n");
|
||||||
@ -817,7 +807,6 @@ TALER_ARL_init (const struct GNUNET_CONFIGURATION_Handle *c)
|
|||||||
}
|
}
|
||||||
found = GNUNET_NO;
|
found = GNUNET_NO;
|
||||||
(void) TALER_ARL_adb->list_exchanges (TALER_ARL_adb->cls,
|
(void) TALER_ARL_adb->list_exchanges (TALER_ARL_adb->cls,
|
||||||
as,
|
|
||||||
&test_master_present,
|
&test_master_present,
|
||||||
&found);
|
&found);
|
||||||
if (GNUNET_NO == found)
|
if (GNUNET_NO == found)
|
||||||
|
@ -59,11 +59,6 @@ extern const struct GNUNET_CONFIGURATION_Handle *TALER_ARL_cfg;
|
|||||||
*/
|
*/
|
||||||
extern struct TALER_AUDITORDB_Plugin *TALER_ARL_adb;
|
extern struct TALER_AUDITORDB_Plugin *TALER_ARL_adb;
|
||||||
|
|
||||||
/**
|
|
||||||
* Our session with the #TALER_ARL_adb.
|
|
||||||
*/
|
|
||||||
extern struct TALER_AUDITORDB_Session *TALER_ARL_asession;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Master public key of the exchange to audit.
|
* Master public key of the exchange to audit.
|
||||||
*/
|
*/
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of TALER
|
This file is part of TALER
|
||||||
Copyright (C) 2014, 2015, 2018, 2019 Taler Systems SA
|
Copyright (C) 2014-2021 Taler Systems SA
|
||||||
|
|
||||||
TALER is free software; you can redistribute it and/or modify it under the
|
TALER is free software; you can redistribute it and/or modify it under the
|
||||||
terms of the GNU General Public License as published by the Free Software
|
terms of the GNU General Public License as published by the Free Software
|
||||||
@ -176,13 +176,12 @@ main (int argc,
|
|||||||
/* Update DB */
|
/* Update DB */
|
||||||
{
|
{
|
||||||
enum GNUNET_DB_QueryStatus qs;
|
enum GNUNET_DB_QueryStatus qs;
|
||||||
struct TALER_AUDITORDB_Session *session;
|
|
||||||
|
|
||||||
session = adb->get_session (adb->cls);
|
if (GNUNET_SYSERR ==
|
||||||
if (NULL == session)
|
adb->preflight (adb->cls))
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"Failed to initialize database session\n");
|
"Failed to initialize database connection\n");
|
||||||
TALER_AUDITORDB_plugin_unload (adb);
|
TALER_AUDITORDB_plugin_unload (adb);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
@ -190,13 +189,11 @@ main (int argc,
|
|||||||
if (remove_flag)
|
if (remove_flag)
|
||||||
{
|
{
|
||||||
qs = adb->delete_exchange (adb->cls,
|
qs = adb->delete_exchange (adb->cls,
|
||||||
session,
|
|
||||||
&master_public_key);
|
&master_public_key);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qs = adb->insert_exchange (adb->cls,
|
qs = adb->insert_exchange (adb->cls,
|
||||||
session,
|
|
||||||
&master_public_key,
|
&master_public_key,
|
||||||
exchange_url);
|
exchange_url);
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,6 @@ verify_and_execute_deposit_confirmation (
|
|||||||
const struct TALER_AUDITORDB_DepositConfirmation *dc,
|
const struct TALER_AUDITORDB_DepositConfirmation *dc,
|
||||||
const struct TALER_AUDITORDB_ExchangeSigningKey *es)
|
const struct TALER_AUDITORDB_ExchangeSigningKey *es)
|
||||||
{
|
{
|
||||||
struct TALER_AUDITORDB_Session *session;
|
|
||||||
enum GNUNET_DB_QueryStatus qs;
|
enum GNUNET_DB_QueryStatus qs;
|
||||||
struct GNUNET_TIME_Absolute now;
|
struct GNUNET_TIME_Absolute now;
|
||||||
struct GNUNET_HashCode h;
|
struct GNUNET_HashCode h;
|
||||||
@ -96,8 +95,8 @@ verify_and_execute_deposit_confirmation (
|
|||||||
cached = GNUNET_CONTAINER_multihashmap_get (cache,
|
cached = GNUNET_CONTAINER_multihashmap_get (cache,
|
||||||
&h);
|
&h);
|
||||||
GNUNET_assert (0 == pthread_mutex_unlock (&lock));
|
GNUNET_assert (0 == pthread_mutex_unlock (&lock));
|
||||||
session = TAH_plugin->get_session (TAH_plugin->cls);
|
if (GNUNET_SYSERR ==
|
||||||
if (NULL == session)
|
TAH_plugin->preflight (TAH_plugin->cls))
|
||||||
{
|
{
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
return TALER_MHD_reply_with_error (connection,
|
return TALER_MHD_reply_with_error (connection,
|
||||||
@ -126,7 +125,6 @@ verify_and_execute_deposit_confirmation (
|
|||||||
|
|
||||||
/* execute transaction */
|
/* execute transaction */
|
||||||
qs = TAH_plugin->insert_exchange_signkey (TAH_plugin->cls,
|
qs = TAH_plugin->insert_exchange_signkey (TAH_plugin->cls,
|
||||||
session,
|
|
||||||
es);
|
es);
|
||||||
if (0 > qs)
|
if (0 > qs)
|
||||||
{
|
{
|
||||||
@ -216,7 +214,6 @@ verify_and_execute_deposit_confirmation (
|
|||||||
|
|
||||||
/* execute transaction */
|
/* execute transaction */
|
||||||
qs = TAH_plugin->insert_deposit_confirmation (TAH_plugin->cls,
|
qs = TAH_plugin->insert_deposit_confirmation (TAH_plugin->cls,
|
||||||
session,
|
|
||||||
dc);
|
dc);
|
||||||
if (0 > qs)
|
if (0 > qs)
|
||||||
{
|
{
|
||||||
|
@ -75,15 +75,14 @@ TAH_EXCHANGES_handler (struct TAH_RequestHandler *rh,
|
|||||||
size_t *upload_data_size)
|
size_t *upload_data_size)
|
||||||
{
|
{
|
||||||
json_t *ja;
|
json_t *ja;
|
||||||
struct TALER_AUDITORDB_Session *session;
|
|
||||||
enum GNUNET_DB_QueryStatus qs;
|
enum GNUNET_DB_QueryStatus qs;
|
||||||
|
|
||||||
(void) rh;
|
(void) rh;
|
||||||
(void) connection_cls;
|
(void) connection_cls;
|
||||||
(void) upload_data;
|
(void) upload_data;
|
||||||
(void) upload_data_size;
|
(void) upload_data_size;
|
||||||
session = TAH_plugin->get_session (TAH_plugin->cls);
|
if (GNUNET_SYSERR ==
|
||||||
if (NULL == session)
|
TAH_plugin->preflight (TAH_plugin->cls))
|
||||||
{
|
{
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
return TALER_MHD_reply_with_error (connection,
|
return TALER_MHD_reply_with_error (connection,
|
||||||
@ -94,7 +93,6 @@ TAH_EXCHANGES_handler (struct TAH_RequestHandler *rh,
|
|||||||
ja = json_array ();
|
ja = json_array ();
|
||||||
GNUNET_break (NULL != ja);
|
GNUNET_break (NULL != ja);
|
||||||
qs = TAH_plugin->list_exchanges (TAH_plugin->cls,
|
qs = TAH_plugin->list_exchanges (TAH_plugin->cls,
|
||||||
session,
|
|
||||||
&add_exchange,
|
&add_exchange,
|
||||||
ja);
|
ja);
|
||||||
if (0 > qs)
|
if (0 > qs)
|
||||||
|
@ -1218,7 +1218,6 @@ analyze_aggregations (void *cls)
|
|||||||
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
||||||
"Analyzing aggregations\n");
|
"Analyzing aggregations\n");
|
||||||
qsp = TALER_ARL_adb->get_auditor_progress_aggregation (TALER_ARL_adb->cls,
|
qsp = TALER_ARL_adb->get_auditor_progress_aggregation (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&ppa);
|
&ppa);
|
||||||
if (0 > qsp)
|
if (0 > qsp)
|
||||||
@ -1243,7 +1242,6 @@ analyze_aggregations (void *cls)
|
|||||||
0,
|
0,
|
||||||
sizeof (ac));
|
sizeof (ac));
|
||||||
qsx = TALER_ARL_adb->get_wire_fee_summary (TALER_ARL_adb->cls,
|
qsx = TALER_ARL_adb->get_wire_fee_summary (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&total_aggregation_fee_income);
|
&total_aggregation_fee_income);
|
||||||
if (0 > qsx)
|
if (0 > qsx)
|
||||||
@ -1282,13 +1280,11 @@ analyze_aggregations (void *cls)
|
|||||||
if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qsx)
|
if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qsx)
|
||||||
ac.qs = TALER_ARL_adb->insert_wire_fee_summary (
|
ac.qs = TALER_ARL_adb->insert_wire_fee_summary (
|
||||||
TALER_ARL_adb->cls,
|
TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&total_aggregation_fee_income);
|
&total_aggregation_fee_income);
|
||||||
else
|
else
|
||||||
ac.qs = TALER_ARL_adb->update_wire_fee_summary (
|
ac.qs = TALER_ARL_adb->update_wire_fee_summary (
|
||||||
TALER_ARL_adb->cls,
|
TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&total_aggregation_fee_income);
|
&total_aggregation_fee_income);
|
||||||
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != ac.qs)
|
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != ac.qs)
|
||||||
@ -1299,13 +1295,11 @@ analyze_aggregations (void *cls)
|
|||||||
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == qsp)
|
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == qsp)
|
||||||
qs = TALER_ARL_adb->update_auditor_progress_aggregation (
|
qs = TALER_ARL_adb->update_auditor_progress_aggregation (
|
||||||
TALER_ARL_adb->cls,
|
TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&ppa);
|
&ppa);
|
||||||
else
|
else
|
||||||
qs = TALER_ARL_adb->insert_auditor_progress_aggregation (
|
qs = TALER_ARL_adb->insert_auditor_progress_aggregation (
|
||||||
TALER_ARL_adb->cls,
|
TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&ppa);
|
&ppa);
|
||||||
if (0 >= qs)
|
if (0 >= qs)
|
||||||
|
@ -679,7 +679,6 @@ init_denomination (const struct GNUNET_HashCode *denom_hash,
|
|||||||
uint64_t rowid;
|
uint64_t rowid;
|
||||||
|
|
||||||
qs = TALER_ARL_adb->get_denomination_balance (TALER_ARL_adb->cls,
|
qs = TALER_ARL_adb->get_denomination_balance (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
denom_hash,
|
denom_hash,
|
||||||
&ds->denom_balance,
|
&ds->denom_balance,
|
||||||
&ds->denom_loss,
|
&ds->denom_loss,
|
||||||
@ -819,7 +818,6 @@ sync_denomination (void *cls,
|
|||||||
outstanding coins as revenue; and reduce cc->risk exposure. */
|
outstanding coins as revenue; and reduce cc->risk exposure. */
|
||||||
if (ds->in_db)
|
if (ds->in_db)
|
||||||
qs = TALER_ARL_adb->del_denomination_balance (TALER_ARL_adb->cls,
|
qs = TALER_ARL_adb->del_denomination_balance (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
denom_hash);
|
denom_hash);
|
||||||
else
|
else
|
||||||
qs = GNUNET_DB_STATUS_SUCCESS_ONE_RESULT;
|
qs = GNUNET_DB_STATUS_SUCCESS_ONE_RESULT;
|
||||||
@ -851,7 +849,6 @@ sync_denomination (void *cls,
|
|||||||
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
(qs = TALER_ARL_adb->insert_historic_denom_revenue (
|
(qs = TALER_ARL_adb->insert_historic_denom_revenue (
|
||||||
TALER_ARL_adb->cls,
|
TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
denom_hash,
|
denom_hash,
|
||||||
expire_deposit,
|
expire_deposit,
|
||||||
@ -905,7 +902,6 @@ sync_denomination (void *cls,
|
|||||||
}
|
}
|
||||||
if (ds->in_db)
|
if (ds->in_db)
|
||||||
qs = TALER_ARL_adb->update_denomination_balance (TALER_ARL_adb->cls,
|
qs = TALER_ARL_adb->update_denomination_balance (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
denom_hash,
|
denom_hash,
|
||||||
&ds->denom_balance,
|
&ds->denom_balance,
|
||||||
&ds->denom_loss,
|
&ds->denom_loss,
|
||||||
@ -914,7 +910,6 @@ sync_denomination (void *cls,
|
|||||||
ds->num_issued);
|
ds->num_issued);
|
||||||
else
|
else
|
||||||
qs = TALER_ARL_adb->insert_denomination_balance (TALER_ARL_adb->cls,
|
qs = TALER_ARL_adb->insert_denomination_balance (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
denom_hash,
|
denom_hash,
|
||||||
&ds->denom_balance,
|
&ds->denom_balance,
|
||||||
&ds->denom_loss,
|
&ds->denom_loss,
|
||||||
@ -2333,7 +2328,6 @@ analyze_coins (void *cls)
|
|||||||
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
||||||
"Analyzing coins\n");
|
"Analyzing coins\n");
|
||||||
qsp = TALER_ARL_adb->get_auditor_progress_coin (TALER_ARL_adb->cls,
|
qsp = TALER_ARL_adb->get_auditor_progress_coin (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&ppc);
|
&ppc);
|
||||||
if (0 > qsp)
|
if (0 > qsp)
|
||||||
@ -2363,7 +2357,6 @@ analyze_coins (void *cls)
|
|||||||
cc.denom_summaries = GNUNET_CONTAINER_multihashmap_create (256,
|
cc.denom_summaries = GNUNET_CONTAINER_multihashmap_create (256,
|
||||||
GNUNET_NO);
|
GNUNET_NO);
|
||||||
qsx = TALER_ARL_adb->get_balance_summary (TALER_ARL_adb->cls,
|
qsx = TALER_ARL_adb->get_balance_summary (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&total_escrow_balance,
|
&total_escrow_balance,
|
||||||
&total_deposit_fee_income,
|
&total_deposit_fee_income,
|
||||||
@ -2473,7 +2466,6 @@ analyze_coins (void *cls)
|
|||||||
}
|
}
|
||||||
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == qsx)
|
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == qsx)
|
||||||
qs = TALER_ARL_adb->update_balance_summary (TALER_ARL_adb->cls,
|
qs = TALER_ARL_adb->update_balance_summary (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&total_escrow_balance,
|
&total_escrow_balance,
|
||||||
&total_deposit_fee_income,
|
&total_deposit_fee_income,
|
||||||
@ -2484,7 +2476,6 @@ analyze_coins (void *cls)
|
|||||||
&total_irregular_recoups);
|
&total_irregular_recoups);
|
||||||
else
|
else
|
||||||
qs = TALER_ARL_adb->insert_balance_summary (TALER_ARL_adb->cls,
|
qs = TALER_ARL_adb->insert_balance_summary (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&total_escrow_balance,
|
&total_escrow_balance,
|
||||||
&total_deposit_fee_income,
|
&total_deposit_fee_income,
|
||||||
@ -2501,12 +2492,10 @@ analyze_coins (void *cls)
|
|||||||
|
|
||||||
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == qsp)
|
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == qsp)
|
||||||
qs = TALER_ARL_adb->update_auditor_progress_coin (TALER_ARL_adb->cls,
|
qs = TALER_ARL_adb->update_auditor_progress_coin (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&ppc);
|
&ppc);
|
||||||
else
|
else
|
||||||
qs = TALER_ARL_adb->insert_auditor_progress_coin (TALER_ARL_adb->cls,
|
qs = TALER_ARL_adb->insert_auditor_progress_coin (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&ppc);
|
&ppc);
|
||||||
if (0 >= qs)
|
if (0 >= qs)
|
||||||
|
@ -188,7 +188,6 @@ analyze_deposit_confirmations (void *cls)
|
|||||||
ppdc.last_deposit_confirmation_serial_id = 0;
|
ppdc.last_deposit_confirmation_serial_id = 0;
|
||||||
qsp = TALER_ARL_adb->get_auditor_progress_deposit_confirmation (
|
qsp = TALER_ARL_adb->get_auditor_progress_deposit_confirmation (
|
||||||
TALER_ARL_adb->cls,
|
TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&ppdc);
|
&ppdc);
|
||||||
if (0 > qsp)
|
if (0 > qsp)
|
||||||
@ -217,7 +216,6 @@ analyze_deposit_confirmations (void *cls)
|
|||||||
dcc.first_missed_coin_serial = UINT64_MAX;
|
dcc.first_missed_coin_serial = UINT64_MAX;
|
||||||
qsx = TALER_ARL_adb->get_deposit_confirmations (
|
qsx = TALER_ARL_adb->get_deposit_confirmations (
|
||||||
TALER_ARL_adb->cls,
|
TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
ppdc.last_deposit_confirmation_serial_id,
|
ppdc.last_deposit_confirmation_serial_id,
|
||||||
&test_dc,
|
&test_dc,
|
||||||
@ -245,13 +243,11 @@ analyze_deposit_confirmations (void *cls)
|
|||||||
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == qsp)
|
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == qsp)
|
||||||
qs = TALER_ARL_adb->update_auditor_progress_deposit_confirmation (
|
qs = TALER_ARL_adb->update_auditor_progress_deposit_confirmation (
|
||||||
TALER_ARL_adb->cls,
|
TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&ppdc);
|
&ppdc);
|
||||||
else
|
else
|
||||||
qs = TALER_ARL_adb->insert_auditor_progress_deposit_confirmation (
|
qs = TALER_ARL_adb->insert_auditor_progress_deposit_confirmation (
|
||||||
TALER_ARL_adb->cls,
|
TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&ppdc);
|
&ppdc);
|
||||||
if (0 >= qs)
|
if (0 >= qs)
|
||||||
|
@ -317,7 +317,6 @@ load_auditor_reserve_summary (struct ReserveSummary *rs)
|
|||||||
uint64_t rowid;
|
uint64_t rowid;
|
||||||
|
|
||||||
qs = TALER_ARL_adb->get_reserve_info (TALER_ARL_adb->cls,
|
qs = TALER_ARL_adb->get_reserve_info (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&rs->reserve_pub,
|
&rs->reserve_pub,
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&rowid,
|
&rowid,
|
||||||
@ -1255,7 +1254,6 @@ verify_reserve_balance (void *cls,
|
|||||||
TALER_B2S (&rs->reserve_pub),
|
TALER_B2S (&rs->reserve_pub),
|
||||||
TALER_amount2s (&nbalance));
|
TALER_amount2s (&nbalance));
|
||||||
qs = TALER_ARL_adb->del_reserve_info (TALER_ARL_adb->cls,
|
qs = TALER_ARL_adb->del_reserve_info (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&rs->reserve_pub,
|
&rs->reserve_pub,
|
||||||
&TALER_ARL_master_pub);
|
&TALER_ARL_master_pub);
|
||||||
if (0 >= qs)
|
if (0 >= qs)
|
||||||
@ -1282,7 +1280,6 @@ verify_reserve_balance (void *cls,
|
|||||||
TALER_amount2s (&nbalance));
|
TALER_amount2s (&nbalance));
|
||||||
if (rs->had_ri)
|
if (rs->had_ri)
|
||||||
qs = TALER_ARL_adb->update_reserve_info (TALER_ARL_adb->cls,
|
qs = TALER_ARL_adb->update_reserve_info (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&rs->reserve_pub,
|
&rs->reserve_pub,
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&nbalance,
|
&nbalance,
|
||||||
@ -1290,7 +1287,6 @@ verify_reserve_balance (void *cls,
|
|||||||
rs->a_expiration_date);
|
rs->a_expiration_date);
|
||||||
else
|
else
|
||||||
qs = TALER_ARL_adb->insert_reserve_info (TALER_ARL_adb->cls,
|
qs = TALER_ARL_adb->insert_reserve_info (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&rs->reserve_pub,
|
&rs->reserve_pub,
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&nbalance,
|
&nbalance,
|
||||||
@ -1333,7 +1329,6 @@ analyze_reserves (void *cls)
|
|||||||
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
||||||
"Analyzing reserves\n");
|
"Analyzing reserves\n");
|
||||||
qsp = TALER_ARL_adb->get_auditor_progress_reserve (TALER_ARL_adb->cls,
|
qsp = TALER_ARL_adb->get_auditor_progress_reserve (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&ppr);
|
&ppr);
|
||||||
if (0 > qsp)
|
if (0 > qsp)
|
||||||
@ -1358,7 +1353,6 @@ analyze_reserves (void *cls)
|
|||||||
}
|
}
|
||||||
rc.qs = GNUNET_DB_STATUS_SUCCESS_ONE_RESULT;
|
rc.qs = GNUNET_DB_STATUS_SUCCESS_ONE_RESULT;
|
||||||
qsx = TALER_ARL_adb->get_reserve_summary (TALER_ARL_adb->cls,
|
qsx = TALER_ARL_adb->get_reserve_summary (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&total_escrow_balance,
|
&total_escrow_balance,
|
||||||
&total_withdraw_fee_income);
|
&total_withdraw_fee_income);
|
||||||
@ -1427,7 +1421,6 @@ analyze_reserves (void *cls)
|
|||||||
if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qsx)
|
if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qsx)
|
||||||
{
|
{
|
||||||
qs = TALER_ARL_adb->insert_reserve_summary (TALER_ARL_adb->cls,
|
qs = TALER_ARL_adb->insert_reserve_summary (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&total_escrow_balance,
|
&total_escrow_balance,
|
||||||
&total_withdraw_fee_income);
|
&total_withdraw_fee_income);
|
||||||
@ -1435,7 +1428,6 @@ analyze_reserves (void *cls)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
qs = TALER_ARL_adb->update_reserve_summary (TALER_ARL_adb->cls,
|
qs = TALER_ARL_adb->update_reserve_summary (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&total_escrow_balance,
|
&total_escrow_balance,
|
||||||
&total_withdraw_fee_income);
|
&total_withdraw_fee_income);
|
||||||
@ -1447,12 +1439,10 @@ analyze_reserves (void *cls)
|
|||||||
}
|
}
|
||||||
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == qsp)
|
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == qsp)
|
||||||
qs = TALER_ARL_adb->update_auditor_progress_reserve (TALER_ARL_adb->cls,
|
qs = TALER_ARL_adb->update_auditor_progress_reserve (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&ppr);
|
&ppr);
|
||||||
else
|
else
|
||||||
qs = TALER_ARL_adb->insert_auditor_progress_reserve (TALER_ARL_adb->cls,
|
qs = TALER_ARL_adb->insert_auditor_progress_reserve (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&ppr);
|
&ppr);
|
||||||
if (0 >= qs)
|
if (0 >= qs)
|
||||||
|
@ -663,8 +663,7 @@ commit (enum GNUNET_DB_QueryStatus qs)
|
|||||||
else
|
else
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"Hard error, not recording progress\n");
|
"Hard error, not recording progress\n");
|
||||||
TALER_ARL_adb->rollback (TALER_ARL_adb->cls,
|
TALER_ARL_adb->rollback (TALER_ARL_adb->cls);
|
||||||
TALER_ARL_asession);
|
|
||||||
TALER_ARL_edb->rollback (TALER_ARL_edb->cls);
|
TALER_ARL_edb->rollback (TALER_ARL_edb->cls);
|
||||||
return qs;
|
return qs;
|
||||||
}
|
}
|
||||||
@ -691,7 +690,6 @@ commit (enum GNUNET_DB_QueryStatus qs)
|
|||||||
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == wa->qsx)
|
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == wa->qsx)
|
||||||
qs = TALER_ARL_adb->update_wire_auditor_account_progress (
|
qs = TALER_ARL_adb->update_wire_auditor_account_progress (
|
||||||
TALER_ARL_adb->cls,
|
TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
wa->ai->section_name,
|
wa->ai->section_name,
|
||||||
&wa->pp,
|
&wa->pp,
|
||||||
@ -700,7 +698,6 @@ commit (enum GNUNET_DB_QueryStatus qs)
|
|||||||
else
|
else
|
||||||
qs = TALER_ARL_adb->insert_wire_auditor_account_progress (
|
qs = TALER_ARL_adb->insert_wire_auditor_account_progress (
|
||||||
TALER_ARL_adb->cls,
|
TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
wa->ai->section_name,
|
wa->ai->section_name,
|
||||||
&wa->pp,
|
&wa->pp,
|
||||||
@ -719,12 +716,10 @@ commit (enum GNUNET_DB_QueryStatus qs)
|
|||||||
NULL);
|
NULL);
|
||||||
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == qsx_gwap)
|
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == qsx_gwap)
|
||||||
qs = TALER_ARL_adb->update_wire_auditor_progress (TALER_ARL_adb->cls,
|
qs = TALER_ARL_adb->update_wire_auditor_progress (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&pp);
|
&pp);
|
||||||
else
|
else
|
||||||
qs = TALER_ARL_adb->insert_wire_auditor_progress (TALER_ARL_adb->cls,
|
qs = TALER_ARL_adb->insert_wire_auditor_progress (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&pp);
|
&pp);
|
||||||
if (0 >= qs)
|
if (0 >= qs)
|
||||||
@ -746,13 +741,11 @@ commit (enum GNUNET_DB_QueryStatus qs)
|
|||||||
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
|
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"Exchange DB commit failed, rolling back transaction\n");
|
"Exchange DB commit failed, rolling back transaction\n");
|
||||||
TALER_ARL_adb->rollback (TALER_ARL_adb->cls,
|
TALER_ARL_adb->rollback (TALER_ARL_adb->cls);
|
||||||
TALER_ARL_asession);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qs = TALER_ARL_adb->commit (TALER_ARL_adb->cls,
|
qs = TALER_ARL_adb->commit (TALER_ARL_adb->cls);
|
||||||
TALER_ARL_asession);
|
|
||||||
if (0 > qs)
|
if (0 > qs)
|
||||||
{
|
{
|
||||||
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
|
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
|
||||||
@ -765,8 +758,7 @@ commit (enum GNUNET_DB_QueryStatus qs)
|
|||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
||||||
"Processing failed, rolling back transaction\n");
|
"Processing failed, rolling back transaction\n");
|
||||||
TALER_ARL_adb->rollback (TALER_ARL_adb->cls,
|
TALER_ARL_adb->rollback (TALER_ARL_adb->cls);
|
||||||
TALER_ARL_asession);
|
|
||||||
TALER_ARL_edb->rollback (TALER_ARL_edb->cls);
|
TALER_ARL_edb->rollback (TALER_ARL_edb->cls);
|
||||||
}
|
}
|
||||||
return qs;
|
return qs;
|
||||||
@ -1947,23 +1939,22 @@ reserve_closed_cb (void *cls,
|
|||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
begin_transaction (void)
|
begin_transaction (void)
|
||||||
{
|
{
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_SYSERR ==
|
||||||
TALER_ARL_edb->preflight (TALER_ARL_edb->cls))
|
TALER_ARL_edb->preflight (TALER_ARL_edb->cls))
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"Failed to initialize exchange database connection.\n");
|
"Failed to initialize exchange database connection.\n");
|
||||||
return GNUNET_DB_STATUS_HARD_ERROR;
|
return GNUNET_DB_STATUS_HARD_ERROR;
|
||||||
}
|
}
|
||||||
TALER_ARL_asession = TALER_ARL_adb->get_session (TALER_ARL_adb->cls);
|
if (GNUNET_SYSERR ==
|
||||||
if (NULL == TALER_ARL_asession)
|
TALER_ARL_adb->preflight (TALER_ARL_adb->cls))
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"Failed to initialize auditor database session.\n");
|
"Failed to initialize auditor database session.\n");
|
||||||
return GNUNET_DB_STATUS_HARD_ERROR;
|
return GNUNET_DB_STATUS_HARD_ERROR;
|
||||||
}
|
}
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
TALER_ARL_adb->start (TALER_ARL_adb->cls,
|
TALER_ARL_adb->start (TALER_ARL_adb->cls))
|
||||||
TALER_ARL_asession))
|
|
||||||
{
|
{
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
return GNUNET_DB_STATUS_HARD_ERROR;
|
return GNUNET_DB_STATUS_HARD_ERROR;
|
||||||
@ -1982,7 +1973,6 @@ begin_transaction (void)
|
|||||||
{
|
{
|
||||||
wa->qsx = TALER_ARL_adb->get_wire_auditor_account_progress (
|
wa->qsx = TALER_ARL_adb->get_wire_auditor_account_progress (
|
||||||
TALER_ARL_adb->cls,
|
TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
wa->ai->section_name,
|
wa->ai->section_name,
|
||||||
&wa->pp,
|
&wa->pp,
|
||||||
@ -1996,7 +1986,6 @@ begin_transaction (void)
|
|||||||
wa->start_pp = wa->pp;
|
wa->start_pp = wa->pp;
|
||||||
}
|
}
|
||||||
qsx_gwap = TALER_ARL_adb->get_wire_auditor_progress (TALER_ARL_adb->cls,
|
qsx_gwap = TALER_ARL_adb->get_wire_auditor_progress (TALER_ARL_adb->cls,
|
||||||
TALER_ARL_asession,
|
|
||||||
&TALER_ARL_master_pub,
|
&TALER_ARL_master_pub,
|
||||||
&pp);
|
&pp);
|
||||||
if (0 > qsx_gwap)
|
if (0 > qsx_gwap)
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -73,7 +73,6 @@ static void
|
|||||||
run (void *cls)
|
run (void *cls)
|
||||||
{
|
{
|
||||||
struct GNUNET_CONFIGURATION_Handle *cfg = cls;
|
struct GNUNET_CONFIGURATION_Handle *cfg = cls;
|
||||||
struct TALER_AUDITORDB_Session *session;
|
|
||||||
uint64_t rowid;
|
uint64_t rowid;
|
||||||
|
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||||
@ -94,16 +93,15 @@ run (void *cls)
|
|||||||
result = 77;
|
result = 77;
|
||||||
goto unload;
|
goto unload;
|
||||||
}
|
}
|
||||||
if (NULL ==
|
if (GNUNET_SYSERR ==
|
||||||
(session = plugin->get_session (plugin->cls)))
|
plugin->preflight (plugin->cls))
|
||||||
{
|
{
|
||||||
result = 77;
|
result = 77;
|
||||||
goto drop;
|
goto drop;
|
||||||
}
|
}
|
||||||
|
|
||||||
FAILIF (GNUNET_OK !=
|
FAILIF (GNUNET_OK !=
|
||||||
plugin->start (plugin->cls,
|
plugin->start (plugin->cls));
|
||||||
session));
|
|
||||||
|
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||||
"initializing\n");
|
"initializing\n");
|
||||||
@ -164,7 +162,6 @@ run (void *cls)
|
|||||||
"Test: auditor_insert_exchange\n");
|
"Test: auditor_insert_exchange\n");
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->insert_exchange (plugin->cls,
|
plugin->insert_exchange (plugin->cls,
|
||||||
session,
|
|
||||||
&master_pub,
|
&master_pub,
|
||||||
"https://exchange/"));
|
"https://exchange/"));
|
||||||
|
|
||||||
@ -187,7 +184,6 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->insert_auditor_progress_coin (plugin->cls,
|
plugin->insert_auditor_progress_coin (plugin->cls,
|
||||||
session,
|
|
||||||
&master_pub,
|
&master_pub,
|
||||||
&ppc));
|
&ppc));
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||||
@ -200,7 +196,6 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->update_auditor_progress_coin (plugin->cls,
|
plugin->update_auditor_progress_coin (plugin->cls,
|
||||||
session,
|
|
||||||
&master_pub,
|
&master_pub,
|
||||||
&ppc));
|
&ppc));
|
||||||
|
|
||||||
@ -209,7 +204,6 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->get_auditor_progress_coin (plugin->cls,
|
plugin->get_auditor_progress_coin (plugin->cls,
|
||||||
session,
|
|
||||||
&master_pub,
|
&master_pub,
|
||||||
&ppc2));
|
&ppc2));
|
||||||
FAILIF ( (ppc.last_deposit_serial_id != ppc2.last_deposit_serial_id) ||
|
FAILIF ( (ppc.last_deposit_serial_id != ppc2.last_deposit_serial_id) ||
|
||||||
@ -233,7 +227,6 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->insert_reserve_info (plugin->cls,
|
plugin->insert_reserve_info (plugin->cls,
|
||||||
session,
|
|
||||||
&reserve_pub,
|
&reserve_pub,
|
||||||
&master_pub,
|
&master_pub,
|
||||||
&reserve_balance,
|
&reserve_balance,
|
||||||
@ -246,7 +239,6 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->update_reserve_info (plugin->cls,
|
plugin->update_reserve_info (plugin->cls,
|
||||||
session,
|
|
||||||
&reserve_pub,
|
&reserve_pub,
|
||||||
&master_pub,
|
&master_pub,
|
||||||
&reserve_balance,
|
&reserve_balance,
|
||||||
@ -260,7 +252,6 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->get_reserve_info (plugin->cls,
|
plugin->get_reserve_info (plugin->cls,
|
||||||
session,
|
|
||||||
&reserve_pub,
|
&reserve_pub,
|
||||||
&master_pub,
|
&master_pub,
|
||||||
&rowid,
|
&rowid,
|
||||||
@ -281,7 +272,6 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->insert_reserve_summary (plugin->cls,
|
plugin->insert_reserve_summary (plugin->cls,
|
||||||
session,
|
|
||||||
&master_pub,
|
&master_pub,
|
||||||
&withdraw_fee_balance,
|
&withdraw_fee_balance,
|
||||||
&reserve_balance));
|
&reserve_balance));
|
||||||
@ -291,7 +281,6 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->update_reserve_summary (plugin->cls,
|
plugin->update_reserve_summary (plugin->cls,
|
||||||
session,
|
|
||||||
&master_pub,
|
&master_pub,
|
||||||
&reserve_balance,
|
&reserve_balance,
|
||||||
&withdraw_fee_balance));
|
&withdraw_fee_balance));
|
||||||
@ -304,7 +293,6 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->get_reserve_summary (plugin->cls,
|
plugin->get_reserve_summary (plugin->cls,
|
||||||
session,
|
|
||||||
&master_pub,
|
&master_pub,
|
||||||
&reserve_balance2,
|
&reserve_balance2,
|
||||||
&withdraw_fee_balance2));
|
&withdraw_fee_balance2));
|
||||||
@ -362,7 +350,6 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->insert_denomination_balance (plugin->cls,
|
plugin->insert_denomination_balance (plugin->cls,
|
||||||
session,
|
|
||||||
&denom_pub_hash,
|
&denom_pub_hash,
|
||||||
&denom_balance,
|
&denom_balance,
|
||||||
&denom_loss,
|
&denom_loss,
|
||||||
@ -380,7 +367,6 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->update_denomination_balance (plugin->cls,
|
plugin->update_denomination_balance (plugin->cls,
|
||||||
session,
|
|
||||||
&denom_pub_hash,
|
&denom_pub_hash,
|
||||||
&denom_balance,
|
&denom_balance,
|
||||||
&denom_loss,
|
&denom_loss,
|
||||||
@ -392,7 +378,6 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->get_denomination_balance (plugin->cls,
|
plugin->get_denomination_balance (plugin->cls,
|
||||||
session,
|
|
||||||
&denom_pub_hash,
|
&denom_pub_hash,
|
||||||
&denom_balance2,
|
&denom_balance2,
|
||||||
&denom_loss2,
|
&denom_loss2,
|
||||||
@ -411,7 +396,6 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->insert_balance_summary (plugin->cls,
|
plugin->insert_balance_summary (plugin->cls,
|
||||||
session,
|
|
||||||
&master_pub,
|
&master_pub,
|
||||||
&refund_fee_balance,
|
&refund_fee_balance,
|
||||||
&melt_fee_balance,
|
&melt_fee_balance,
|
||||||
@ -426,7 +410,6 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->update_balance_summary (plugin->cls,
|
plugin->update_balance_summary (plugin->cls,
|
||||||
session,
|
|
||||||
&master_pub,
|
&master_pub,
|
||||||
&denom_balance,
|
&denom_balance,
|
||||||
&deposit_fee_balance,
|
&deposit_fee_balance,
|
||||||
@ -449,7 +432,6 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->get_balance_summary (plugin->cls,
|
plugin->get_balance_summary (plugin->cls,
|
||||||
session,
|
|
||||||
&master_pub,
|
&master_pub,
|
||||||
&denom_balance2,
|
&denom_balance2,
|
||||||
&deposit_fee_balance2,
|
&deposit_fee_balance2,
|
||||||
@ -480,7 +462,6 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->insert_historic_denom_revenue (plugin->cls,
|
plugin->insert_historic_denom_revenue (plugin->cls,
|
||||||
session,
|
|
||||||
&master_pub,
|
&master_pub,
|
||||||
&denom_pub_hash,
|
&denom_pub_hash,
|
||||||
past,
|
past,
|
||||||
@ -489,7 +470,6 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->insert_historic_denom_revenue (plugin->cls,
|
plugin->insert_historic_denom_revenue (plugin->cls,
|
||||||
session,
|
|
||||||
&master_pub,
|
&master_pub,
|
||||||
&rnd_hash,
|
&rnd_hash,
|
||||||
now,
|
now,
|
||||||
@ -534,7 +514,6 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (0 >=
|
FAILIF (0 >=
|
||||||
plugin->select_historic_denom_revenue (plugin->cls,
|
plugin->select_historic_denom_revenue (plugin->cls,
|
||||||
session,
|
|
||||||
&master_pub,
|
&master_pub,
|
||||||
&
|
&
|
||||||
select_historic_denom_revenue_result,
|
select_historic_denom_revenue_result,
|
||||||
@ -550,7 +529,6 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->insert_historic_reserve_revenue (plugin->cls,
|
plugin->insert_historic_reserve_revenue (plugin->cls,
|
||||||
session,
|
|
||||||
&master_pub,
|
&master_pub,
|
||||||
past,
|
past,
|
||||||
future,
|
future,
|
||||||
@ -558,7 +536,6 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->insert_historic_reserve_revenue (plugin->cls,
|
plugin->insert_historic_reserve_revenue (plugin->cls,
|
||||||
session,
|
|
||||||
&master_pub,
|
&master_pub,
|
||||||
now,
|
now,
|
||||||
future,
|
future,
|
||||||
@ -598,7 +575,6 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (0 >=
|
FAILIF (0 >=
|
||||||
plugin->select_historic_reserve_revenue (plugin->cls,
|
plugin->select_historic_reserve_revenue (plugin->cls,
|
||||||
session,
|
|
||||||
&master_pub,
|
&master_pub,
|
||||||
select_historic_reserve_revenue_result,
|
select_historic_reserve_revenue_result,
|
||||||
NULL));
|
NULL));
|
||||||
@ -608,7 +584,6 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->insert_predicted_result (plugin->cls,
|
plugin->insert_predicted_result (plugin->cls,
|
||||||
session,
|
|
||||||
&master_pub,
|
&master_pub,
|
||||||
&rbalance));
|
&rbalance));
|
||||||
|
|
||||||
@ -621,18 +596,15 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->update_predicted_result (plugin->cls,
|
plugin->update_predicted_result (plugin->cls,
|
||||||
session,
|
|
||||||
&master_pub,
|
&master_pub,
|
||||||
&rbalance));
|
&rbalance));
|
||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->insert_wire_fee_summary (plugin->cls,
|
plugin->insert_wire_fee_summary (plugin->cls,
|
||||||
session,
|
|
||||||
&master_pub,
|
&master_pub,
|
||||||
&rbalance));
|
&rbalance));
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->update_wire_fee_summary (plugin->cls,
|
plugin->update_wire_fee_summary (plugin->cls,
|
||||||
session,
|
|
||||||
&master_pub,
|
&master_pub,
|
||||||
&reserve_profits));
|
&reserve_profits));
|
||||||
{
|
{
|
||||||
@ -640,7 +612,6 @@ run (void *cls)
|
|||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->get_wire_fee_summary (plugin->cls,
|
plugin->get_wire_fee_summary (plugin->cls,
|
||||||
session,
|
|
||||||
&master_pub,
|
&master_pub,
|
||||||
&rprof));
|
&rprof));
|
||||||
FAILIF (0 !=
|
FAILIF (0 !=
|
||||||
@ -648,34 +619,29 @@ run (void *cls)
|
|||||||
&reserve_profits));
|
&reserve_profits));
|
||||||
}
|
}
|
||||||
FAILIF (0 >
|
FAILIF (0 >
|
||||||
plugin->commit (plugin->cls,
|
plugin->commit (plugin->cls));
|
||||||
session));
|
|
||||||
|
|
||||||
|
|
||||||
FAILIF (GNUNET_OK !=
|
FAILIF (GNUNET_OK !=
|
||||||
plugin->start (plugin->cls,
|
plugin->start (plugin->cls));
|
||||||
session));
|
|
||||||
|
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||||
"Test: get_predicted_balance\n");
|
"Test: get_predicted_balance\n");
|
||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->get_predicted_balance (plugin->cls,
|
plugin->get_predicted_balance (plugin->cls,
|
||||||
session,
|
|
||||||
&master_pub,
|
&master_pub,
|
||||||
&rbalance2));
|
&rbalance2));
|
||||||
|
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->del_reserve_info (plugin->cls,
|
plugin->del_reserve_info (plugin->cls,
|
||||||
session,
|
|
||||||
&reserve_pub,
|
&reserve_pub,
|
||||||
&master_pub));
|
&master_pub));
|
||||||
|
|
||||||
FAILIF (0 != TALER_amount_cmp (&rbalance2,
|
FAILIF (0 != TALER_amount_cmp (&rbalance2,
|
||||||
&rbalance));
|
&rbalance));
|
||||||
|
|
||||||
plugin->rollback (plugin->cls,
|
plugin->rollback (plugin->cls);
|
||||||
session);
|
|
||||||
|
|
||||||
#if GC_IMPLEMENTED
|
#if GC_IMPLEMENTED
|
||||||
FAILIF (GNUNET_OK !=
|
FAILIF (GNUNET_OK !=
|
||||||
@ -685,22 +651,17 @@ run (void *cls)
|
|||||||
result = 0;
|
result = 0;
|
||||||
|
|
||||||
drop:
|
drop:
|
||||||
if (NULL != session)
|
|
||||||
{
|
{
|
||||||
plugin->rollback (plugin->cls,
|
plugin->rollback (plugin->cls);
|
||||||
session);
|
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||||
"Test: auditor_delete_exchange\n");
|
"Test: auditor_delete_exchange\n");
|
||||||
GNUNET_break (GNUNET_OK ==
|
GNUNET_break (GNUNET_OK ==
|
||||||
plugin->start (plugin->cls,
|
plugin->start (plugin->cls));
|
||||||
session));
|
|
||||||
GNUNET_break (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT ==
|
GNUNET_break (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT ==
|
||||||
plugin->delete_exchange (plugin->cls,
|
plugin->delete_exchange (plugin->cls,
|
||||||
session,
|
|
||||||
&master_pub));
|
&master_pub));
|
||||||
GNUNET_break (0 <=
|
GNUNET_break (0 <=
|
||||||
plugin->commit (plugin->cls,
|
plugin->commit (plugin->cls));
|
||||||
session));
|
|
||||||
}
|
}
|
||||||
GNUNET_break (GNUNET_OK ==
|
GNUNET_break (GNUNET_OK ==
|
||||||
plugin->drop_tables (plugin->cls,
|
plugin->drop_tables (plugin->cls,
|
||||||
|
@ -344,9 +344,7 @@ static struct TEH_KeyStateHandle *key_state;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Counter incremented whenever we have a reason to re-build the keys because
|
* Counter incremented whenever we have a reason to re-build the keys because
|
||||||
* something external changed (in another thread). The counter is manipulated
|
* something external changed (in another thread). See #TEH_keys_get_state() and
|
||||||
* using an atomic update, and thus to ensure that threads notice when it
|
|
||||||
* changes, the variable MUST be volatile. See #TEH_keys_get_state() and
|
|
||||||
* #TEH_keys_update_states() for uses of this variable.
|
* #TEH_keys_update_states() for uses of this variable.
|
||||||
*/
|
*/
|
||||||
static uint64_t key_generation;
|
static uint64_t key_generation;
|
||||||
@ -1721,8 +1719,7 @@ build_key_state (struct HelperState *hs,
|
|||||||
void
|
void
|
||||||
TEH_keys_update_states ()
|
TEH_keys_update_states ()
|
||||||
{
|
{
|
||||||
__sync_fetch_and_add (&key_generation,
|
key_generation++;
|
||||||
1);
|
|
||||||
TEH_resume_keys_requests (false);
|
TEH_resume_keys_requests (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of TALER
|
This file is part of TALER
|
||||||
Copyright (C) 2014-2018 Taler Systems SA
|
Copyright (C) 2014-2021 Taler Systems SA
|
||||||
|
|
||||||
TALER is free software; you can redistribute it and/or modify it under the
|
TALER is free software; you can redistribute it and/or modify it under the
|
||||||
terms of the GNU General Public License as published by the Free Software
|
terms of the GNU General Public License as published by the Free Software
|
||||||
@ -356,12 +356,6 @@ typedef int
|
|||||||
const struct TALER_AUDITORDB_DepositConfirmation *dc);
|
const struct TALER_AUDITORDB_DepositConfirmation *dc);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handle for one session with the database.
|
|
||||||
*/
|
|
||||||
struct TALER_AUDITORDB_Session;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The plugin API, returned from the plugin's "init" function.
|
* @brief The plugin API, returned from the plugin's "init" function.
|
||||||
* The argument given to "init" is simply a configuration handle.
|
* The argument given to "init" is simply a configuration handle.
|
||||||
@ -384,14 +378,16 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
char *library_name;
|
char *library_name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the thread-local database-handle.
|
* Fully connect to the db if the connection does not exist yet
|
||||||
* Connect to the db if the connection does not exist yet.
|
* and check that there is no transaction currently running.
|
||||||
*
|
*
|
||||||
* @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 the database connection, or NULL on error
|
* @return #GNUNET_OK on success
|
||||||
|
* #GNUNET_NO if we rolled back an earlier transaction
|
||||||
|
* #GNUNET_SYSERR if we have no DB connection
|
||||||
*/
|
*/
|
||||||
struct TALER_AUDITORDB_Session *
|
enum GNUNET_GenericReturnValue
|
||||||
(*get_session) (void *cls);
|
(*preflight)(void *cls);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -405,9 +401,9 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* used when restarting the auditor
|
* used when restarting the auditor
|
||||||
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure
|
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure
|
||||||
*/
|
*/
|
||||||
int
|
enum GNUNET_GenericReturnValue
|
||||||
(*drop_tables) (void *cls,
|
(*drop_tables)(void *cls,
|
||||||
int drop_exchangelist);
|
int drop_exchangelist);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -416,43 +412,37 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @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
|
||||||
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure
|
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure
|
||||||
*/
|
*/
|
||||||
int
|
enum GNUNET_GenericReturnValue
|
||||||
(*create_tables) (void *cls);
|
(*create_tables)(void *cls);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start a transaction.
|
* Start a transaction.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @return #GNUNET_OK on success
|
* @return #GNUNET_OK on success
|
||||||
*/
|
*/
|
||||||
int
|
enum GNUNET_GenericReturnValue
|
||||||
(*start) (void *cls,
|
(*start)(void *cls);
|
||||||
struct TALER_AUDITORDB_Session *session);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Commit a transaction.
|
* Commit a transaction.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*commit)(void *cls,
|
(*commit)(void *cls);
|
||||||
struct TALER_AUDITORDB_Session *session);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Abort/rollback a transaction.
|
* Abort/rollback a transaction.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
(*rollback) (void *cls,
|
(*rollback) (void *cls);
|
||||||
struct TALER_AUDITORDB_Session *session);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -471,14 +461,12 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* Insert information about an exchange this auditor will be auditing.
|
* Insert information about an exchange this auditor will be auditing.
|
||||||
*
|
*
|
||||||
* @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 master_pub master public key of the exchange
|
* @param master_pub master public key of the exchange
|
||||||
* @param exchange_url public (base) URL of the API of the exchange
|
* @param exchange_url public (base) URL of the API of the exchange
|
||||||
* @return query result status
|
* @return query result status
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_exchange)(void *cls,
|
(*insert_exchange)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const char *exchange_url);
|
const char *exchange_url);
|
||||||
|
|
||||||
@ -489,13 +477,11 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* to this exchange!
|
* to this exchange!
|
||||||
*
|
*
|
||||||
* @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 master_pub master public key of the exchange
|
* @param master_pub master public key of the exchange
|
||||||
* @return query result status
|
* @return query result status
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*delete_exchange)(void *cls,
|
(*delete_exchange)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub);
|
const struct TALER_MasterPublicKeyP *master_pub);
|
||||||
|
|
||||||
|
|
||||||
@ -503,14 +489,12 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* Obtain information about exchanges this auditor is auditing.
|
* Obtain information about exchanges this auditor is auditing.
|
||||||
*
|
*
|
||||||
* @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 cb function to call with the results
|
* @param cb function to call with the results
|
||||||
* @param cb_cls closure for @a cb
|
* @param cb_cls closure for @a cb
|
||||||
* @return query result status
|
* @return query result status
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*list_exchanges)(void *cls,
|
(*list_exchanges)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
TALER_AUDITORDB_ExchangeCallback cb,
|
TALER_AUDITORDB_ExchangeCallback cb,
|
||||||
void *cb_cls);
|
void *cb_cls);
|
||||||
|
|
||||||
@ -518,14 +502,12 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* Insert information about a signing key of the exchange.
|
* Insert information about a signing key of the exchange.
|
||||||
*
|
*
|
||||||
* @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 sk signing key information to store
|
* @param sk signing key information to store
|
||||||
* @return query result status
|
* @return query result status
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_exchange_signkey)(
|
(*insert_exchange_signkey)(
|
||||||
void *cls,
|
void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_AUDITORDB_ExchangeSigningKey *sk);
|
const struct TALER_AUDITORDB_ExchangeSigningKey *sk);
|
||||||
|
|
||||||
|
|
||||||
@ -533,14 +515,12 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* Insert information about a deposit confirmation into the database.
|
* Insert information about a deposit confirmation into the database.
|
||||||
*
|
*
|
||||||
* @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 dc deposit confirmation information to store
|
* @param dc deposit confirmation information to store
|
||||||
* @return query result status
|
* @return query result status
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_deposit_confirmation)(
|
(*insert_deposit_confirmation)(
|
||||||
void *cls,
|
void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_AUDITORDB_DepositConfirmation *dc);
|
const struct TALER_AUDITORDB_DepositConfirmation *dc);
|
||||||
|
|
||||||
|
|
||||||
@ -548,7 +528,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* Get information about deposit confirmations from the database.
|
* Get information about deposit confirmations from the database.
|
||||||
*
|
*
|
||||||
* @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 master_public_key for which exchange do we want to get deposit confirmations
|
* @param master_public_key for which exchange do we want to get deposit confirmations
|
||||||
* @param start_id row/serial ID where to start the iteration (0 from
|
* @param start_id row/serial ID where to start the iteration (0 from
|
||||||
* the start, exclusive, i.e. serial_ids must start from 1)
|
* the start, exclusive, i.e. serial_ids must start from 1)
|
||||||
@ -559,7 +538,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*get_deposit_confirmations)(
|
(*get_deposit_confirmations)(
|
||||||
void *cls,
|
void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_public_key,
|
const struct TALER_MasterPublicKeyP *master_public_key,
|
||||||
uint64_t start_id,
|
uint64_t start_id,
|
||||||
TALER_AUDITORDB_DepositConfirmationCallback cb,
|
TALER_AUDITORDB_DepositConfirmationCallback cb,
|
||||||
@ -571,7 +549,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* data.
|
* 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 connection to use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param ppc where is the auditor in processing
|
* @param ppc where is the auditor in processing
|
||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
@ -579,7 +556,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_auditor_progress_coin)(
|
(*insert_auditor_progress_coin)(
|
||||||
void *cls,
|
void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_AUDITORDB_ProgressPointCoin *ppc);
|
const struct TALER_AUDITORDB_ProgressPointCoin *ppc);
|
||||||
|
|
||||||
@ -589,7 +565,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* must be an existing record for the exchange.
|
* must be an existing record for the exchange.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param ppc where is the auditor in processing
|
* @param ppc where is the auditor in processing
|
||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
@ -597,7 +572,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*update_auditor_progress_coin)(
|
(*update_auditor_progress_coin)(
|
||||||
void *cls,
|
void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_AUDITORDB_ProgressPointCoin *ppc);
|
const struct TALER_AUDITORDB_ProgressPointCoin *ppc);
|
||||||
|
|
||||||
@ -606,14 +580,12 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* Get information about the progress of the auditor.
|
* Get information about the progress of the auditor.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param[out] ppc set to where the auditor is in processing
|
* @param[out] ppc set to where the auditor is in processing
|
||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*get_auditor_progress_coin)(void *cls,
|
(*get_auditor_progress_coin)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
struct TALER_AUDITORDB_ProgressPointCoin *ppc);
|
struct TALER_AUDITORDB_ProgressPointCoin *ppc);
|
||||||
|
|
||||||
@ -622,7 +594,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* data.
|
* 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 connection to use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param ppr where is the auditor in processing
|
* @param ppr where is the auditor in processing
|
||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
@ -630,7 +601,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_auditor_progress_reserve)(
|
(*insert_auditor_progress_reserve)(
|
||||||
void *cls,
|
void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_AUDITORDB_ProgressPointReserve *ppr);
|
const struct TALER_AUDITORDB_ProgressPointReserve *ppr);
|
||||||
|
|
||||||
@ -640,7 +610,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* must be an existing record for the exchange.
|
* must be an existing record for the exchange.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param ppr where is the auditor in processing
|
* @param ppr where is the auditor in processing
|
||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
@ -648,7 +617,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*update_auditor_progress_reserve)(
|
(*update_auditor_progress_reserve)(
|
||||||
void *cls,
|
void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_AUDITORDB_ProgressPointReserve *ppr);
|
const struct TALER_AUDITORDB_ProgressPointReserve *ppr);
|
||||||
|
|
||||||
@ -657,7 +625,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* Get information about the progress of the auditor.
|
* Get information about the progress of the auditor.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param[out] ppr set to where the auditor is in processing
|
* @param[out] ppr set to where the auditor is in processing
|
||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
@ -665,7 +632,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*get_auditor_progress_reserve)(
|
(*get_auditor_progress_reserve)(
|
||||||
void *cls,
|
void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
struct TALER_AUDITORDB_ProgressPointReserve *ppr);
|
struct TALER_AUDITORDB_ProgressPointReserve *ppr);
|
||||||
|
|
||||||
@ -674,7 +640,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* data.
|
* 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 connection to use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param ppdc where is the auditor in processing
|
* @param ppdc where is the auditor in processing
|
||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
@ -682,7 +647,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_auditor_progress_deposit_confirmation)(
|
(*insert_auditor_progress_deposit_confirmation)(
|
||||||
void *cls,
|
void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_AUDITORDB_ProgressPointDepositConfirmation *ppdc);
|
const struct TALER_AUDITORDB_ProgressPointDepositConfirmation *ppdc);
|
||||||
|
|
||||||
@ -692,7 +656,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* must be an existing record for the exchange.
|
* must be an existing record for the exchange.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param ppdc where is the auditor in processing
|
* @param ppdc where is the auditor in processing
|
||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
@ -700,7 +663,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*update_auditor_progress_deposit_confirmation)(
|
(*update_auditor_progress_deposit_confirmation)(
|
||||||
void *cls,
|
void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_AUDITORDB_ProgressPointDepositConfirmation *ppdc);
|
const struct TALER_AUDITORDB_ProgressPointDepositConfirmation *ppdc);
|
||||||
|
|
||||||
@ -709,7 +671,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* Get information about the progress of the auditor.
|
* Get information about the progress of the auditor.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param[out] ppdc set to where the auditor is in processing
|
* @param[out] ppdc set to where the auditor is in processing
|
||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
@ -717,7 +678,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*get_auditor_progress_deposit_confirmation)(
|
(*get_auditor_progress_deposit_confirmation)(
|
||||||
void *cls,
|
void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
struct TALER_AUDITORDB_ProgressPointDepositConfirmation *ppdc);
|
struct TALER_AUDITORDB_ProgressPointDepositConfirmation *ppdc);
|
||||||
|
|
||||||
@ -727,7 +687,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* data.
|
* 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 connection to use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param ppa where is the auditor in processing
|
* @param ppa where is the auditor in processing
|
||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
@ -735,7 +694,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_auditor_progress_aggregation)(
|
(*insert_auditor_progress_aggregation)(
|
||||||
void *cls,
|
void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_AUDITORDB_ProgressPointAggregation *ppa);
|
const struct TALER_AUDITORDB_ProgressPointAggregation *ppa);
|
||||||
|
|
||||||
@ -745,7 +703,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* must be an existing record for the exchange.
|
* must be an existing record for the exchange.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param ppa where is the auditor in processing
|
* @param ppa where is the auditor in processing
|
||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
@ -753,7 +710,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*update_auditor_progress_aggregation)(
|
(*update_auditor_progress_aggregation)(
|
||||||
void *cls,
|
void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_AUDITORDB_ProgressPointAggregation *ppa);
|
const struct TALER_AUDITORDB_ProgressPointAggregation *ppa);
|
||||||
|
|
||||||
@ -762,7 +718,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* Get information about the progress of the auditor.
|
* Get information about the progress of the auditor.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param[out] ppa set to where the auditor is in processing
|
* @param[out] ppa set to where the auditor is in processing
|
||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
@ -770,7 +725,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*get_auditor_progress_aggregation)(
|
(*get_auditor_progress_aggregation)(
|
||||||
void *cls,
|
void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
struct TALER_AUDITORDB_ProgressPointAggregation *ppa);
|
struct TALER_AUDITORDB_ProgressPointAggregation *ppa);
|
||||||
|
|
||||||
@ -780,7 +734,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* data.
|
* 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 connection to use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param account_name name of the wire account we are auditing
|
* @param account_name name of the wire account we are auditing
|
||||||
* @param pp where is the auditor in processing
|
* @param pp where is the auditor in processing
|
||||||
@ -791,7 +744,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_wire_auditor_account_progress)(
|
(*insert_wire_auditor_account_progress)(
|
||||||
void *cls,
|
void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const char *account_name,
|
const char *account_name,
|
||||||
const struct TALER_AUDITORDB_WireAccountProgressPoint *pp,
|
const struct TALER_AUDITORDB_WireAccountProgressPoint *pp,
|
||||||
@ -804,7 +756,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* must be an existing record for the exchange.
|
* must be an existing record for the exchange.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param account_name name of the wire account we are auditing
|
* @param account_name name of the wire account we are auditing
|
||||||
* @param pp where is the auditor in processing
|
* @param pp where is the auditor in processing
|
||||||
@ -815,7 +766,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*update_wire_auditor_account_progress)(
|
(*update_wire_auditor_account_progress)(
|
||||||
void *cls,
|
void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const char *account_name,
|
const char *account_name,
|
||||||
const struct TALER_AUDITORDB_WireAccountProgressPoint *pp,
|
const struct TALER_AUDITORDB_WireAccountProgressPoint *pp,
|
||||||
@ -827,7 +777,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* Get information about the progress of the wire auditor.
|
* Get information about the progress of the wire auditor.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param account_name name of the wire account we are auditing
|
* @param account_name name of the wire account we are auditing
|
||||||
* @param[out] pp where is the auditor in processing
|
* @param[out] pp where is the auditor in processing
|
||||||
@ -838,7 +787,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*get_wire_auditor_account_progress)(
|
(*get_wire_auditor_account_progress)(
|
||||||
void *cls,
|
void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const char *account_name,
|
const char *account_name,
|
||||||
struct TALER_AUDITORDB_WireAccountProgressPoint *pp,
|
struct TALER_AUDITORDB_WireAccountProgressPoint *pp,
|
||||||
@ -851,7 +799,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* data.
|
* 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 connection to use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param account_name name of the wire account we are auditing
|
* @param account_name name of the wire account we are auditing
|
||||||
* @param pp where is the auditor in processing
|
* @param pp where is the auditor in processing
|
||||||
@ -860,7 +807,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_wire_auditor_progress)(
|
(*insert_wire_auditor_progress)(
|
||||||
void *cls,
|
void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_AUDITORDB_WireProgressPoint *pp);
|
const struct TALER_AUDITORDB_WireProgressPoint *pp);
|
||||||
|
|
||||||
@ -870,7 +816,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* must be an existing record for the exchange.
|
* must be an existing record for the exchange.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param account_name name of the wire account we are auditing
|
* @param account_name name of the wire account we are auditing
|
||||||
* @param pp where is the auditor in processing
|
* @param pp where is the auditor in processing
|
||||||
@ -879,7 +824,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*update_wire_auditor_progress)(
|
(*update_wire_auditor_progress)(
|
||||||
void *cls,
|
void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_AUDITORDB_WireProgressPoint *pp);
|
const struct TALER_AUDITORDB_WireProgressPoint *pp);
|
||||||
|
|
||||||
@ -888,7 +832,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* Get information about the progress of the wire auditor.
|
* Get information about the progress of the wire auditor.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param account_name name of the wire account we are auditing
|
* @param account_name name of the wire account we are auditing
|
||||||
* @param[out] pp set to where the auditor is in processing
|
* @param[out] pp set to where the auditor is in processing
|
||||||
@ -896,7 +839,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*get_wire_auditor_progress)(void *cls,
|
(*get_wire_auditor_progress)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
struct TALER_AUDITORDB_WireProgressPoint *pp);
|
struct TALER_AUDITORDB_WireProgressPoint *pp);
|
||||||
|
|
||||||
@ -906,7 +848,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* existing record for the reserve.
|
* existing record for the reserve.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param reserve_pub public key of the reserve
|
* @param reserve_pub public key of the reserve
|
||||||
* @param master_pub master public key of the exchange
|
* @param master_pub master public key of the exchange
|
||||||
* @param reserve_balance amount stored in the reserve
|
* @param reserve_balance amount stored in the reserve
|
||||||
@ -918,7 +859,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_reserve_info)(void *cls,
|
(*insert_reserve_info)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_ReservePublicKeyP *reserve_pub,
|
const struct TALER_ReservePublicKeyP *reserve_pub,
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_Amount *reserve_balance,
|
const struct TALER_Amount *reserve_balance,
|
||||||
@ -932,7 +872,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* existing record, which must already exist.
|
* existing record, which must already exist.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param reserve_pub public key of the reserve
|
* @param reserve_pub public key of the reserve
|
||||||
* @param master_pub master public key of the exchange
|
* @param master_pub master public key of the exchange
|
||||||
* @param reserve_balance amount stored in the reserve
|
* @param reserve_balance amount stored in the reserve
|
||||||
@ -943,7 +882,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*update_reserve_info)(void *cls,
|
(*update_reserve_info)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_ReservePublicKeyP *reserve_pub,
|
const struct TALER_ReservePublicKeyP *reserve_pub,
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_Amount *reserve_balance,
|
const struct TALER_Amount *reserve_balance,
|
||||||
@ -955,7 +893,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* Get information about a reserve.
|
* Get information about a reserve.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param reserve_pub public key of the reserve
|
* @param reserve_pub public key of the reserve
|
||||||
* @param master_pub master public key of the exchange
|
* @param master_pub master public key of the exchange
|
||||||
* @param[out] rowid which row did we get the information from
|
* @param[out] rowid which row did we get the information from
|
||||||
@ -968,7 +905,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*get_reserve_info)(void *cls,
|
(*get_reserve_info)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_ReservePublicKeyP *reserve_pub,
|
const struct TALER_ReservePublicKeyP *reserve_pub,
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
uint64_t *rowid,
|
uint64_t *rowid,
|
||||||
@ -982,14 +918,12 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* Delete information about a reserve.
|
* Delete information about a reserve.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param reserve_pub public key of the reserve
|
* @param reserve_pub public key of the reserve
|
||||||
* @param master_pub master public key of the exchange
|
* @param master_pub master public key of the exchange
|
||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*del_reserve_info)(void *cls,
|
(*del_reserve_info)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_ReservePublicKeyP *reserve_pub,
|
const struct TALER_ReservePublicKeyP *reserve_pub,
|
||||||
const struct TALER_MasterPublicKeyP *master_pub);
|
const struct TALER_MasterPublicKeyP *master_pub);
|
||||||
|
|
||||||
@ -999,7 +933,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* existing record for the @a master_pub.
|
* existing record for the @a master_pub.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master public key of the exchange
|
* @param master_pub master public key of the exchange
|
||||||
* @param reserve_balance amount stored in the reserve
|
* @param reserve_balance amount stored in the reserve
|
||||||
* @param withdraw_fee_balance amount the exchange gained in withdraw fees
|
* @param withdraw_fee_balance amount the exchange gained in withdraw fees
|
||||||
@ -1008,7 +941,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_reserve_summary)(void *cls,
|
(*insert_reserve_summary)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_Amount *reserve_balance,
|
const struct TALER_Amount *reserve_balance,
|
||||||
const struct TALER_Amount *withdraw_fee_balance);
|
const struct TALER_Amount *withdraw_fee_balance);
|
||||||
@ -1019,7 +951,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* existing record, which must already exist.
|
* existing record, which must already exist.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master public key of the exchange
|
* @param master_pub master public key of the exchange
|
||||||
* @param reserve_balance amount stored in the reserve
|
* @param reserve_balance amount stored in the reserve
|
||||||
* @param withdraw_fee_balance amount the exchange gained in withdraw fees
|
* @param withdraw_fee_balance amount the exchange gained in withdraw fees
|
||||||
@ -1028,7 +959,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*update_reserve_summary)(void *cls,
|
(*update_reserve_summary)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_Amount *reserve_balance,
|
const struct TALER_Amount *reserve_balance,
|
||||||
const struct TALER_Amount *withdraw_fee_balance);
|
const struct TALER_Amount *withdraw_fee_balance);
|
||||||
@ -1038,7 +968,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* Get summary information about all reserves.
|
* Get summary information about all reserves.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master public key of the exchange
|
* @param master_pub master public key of the exchange
|
||||||
* @param[out] reserve_balance amount stored in the reserve
|
* @param[out] reserve_balance amount stored in the reserve
|
||||||
* @param[out] withdraw_fee_balance amount the exchange gained in withdraw fees
|
* @param[out] withdraw_fee_balance amount the exchange gained in withdraw fees
|
||||||
@ -1047,7 +976,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*get_reserve_summary)(void *cls,
|
(*get_reserve_summary)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
struct TALER_Amount *reserve_balance,
|
struct TALER_Amount *reserve_balance,
|
||||||
struct TALER_Amount *withdraw_fee_balance);
|
struct TALER_Amount *withdraw_fee_balance);
|
||||||
@ -1058,14 +986,12 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* existing record for the same @a master_pub.
|
* existing record for the same @a master_pub.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master public key of the exchange
|
* @param master_pub master public key of the exchange
|
||||||
* @param wire_fee_balance amount the exchange gained in wire fees
|
* @param wire_fee_balance amount the exchange gained in wire fees
|
||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_wire_fee_summary)(void *cls,
|
(*insert_wire_fee_summary)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_Amount *wire_fee_balance);
|
const struct TALER_Amount *wire_fee_balance);
|
||||||
|
|
||||||
@ -1075,14 +1001,12 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* existing record, which must already exist.
|
* existing record, which must already exist.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master public key of the exchange
|
* @param master_pub master public key of the exchange
|
||||||
* @param wire_fee_balance amount the exchange gained in wire fees
|
* @param wire_fee_balance amount the exchange gained in wire fees
|
||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*update_wire_fee_summary)(void *cls,
|
(*update_wire_fee_summary)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_Amount *wire_fee_balance);
|
const struct TALER_Amount *wire_fee_balance);
|
||||||
|
|
||||||
@ -1091,14 +1015,12 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* Get summary information about an exchanges wire fee balance.
|
* Get summary information about an exchanges wire fee balance.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master public key of the exchange
|
* @param master_pub master public key of the exchange
|
||||||
* @param[out] wire_fee_balance set amount the exchange gained in wire fees
|
* @param[out] wire_fee_balance set amount the exchange gained in wire fees
|
||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*get_wire_fee_summary)(void *cls,
|
(*get_wire_fee_summary)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
struct TALER_Amount *wire_fee_balance);
|
struct TALER_Amount *wire_fee_balance);
|
||||||
|
|
||||||
@ -1108,7 +1030,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* must not be an existing record for the denomination key.
|
* must not be an existing record for the denomination key.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param denom_pub_hash hash of the denomination public key
|
* @param denom_pub_hash hash of the denomination public key
|
||||||
* @param denom_balance value of coins outstanding with this denomination key
|
* @param denom_balance value of coins outstanding with this denomination key
|
||||||
* @param denom_loss value of coins redeemed that were not outstanding (effectively, negative @a denom_balance)
|
* @param denom_loss value of coins redeemed that were not outstanding (effectively, negative @a denom_balance)
|
||||||
@ -1119,7 +1040,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_denomination_balance)(void *cls,
|
(*insert_denomination_balance)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct GNUNET_HashCode *denom_pub_hash,
|
const struct GNUNET_HashCode *denom_pub_hash,
|
||||||
const struct TALER_Amount *denom_balance,
|
const struct TALER_Amount *denom_balance,
|
||||||
const struct TALER_Amount *denom_loss,
|
const struct TALER_Amount *denom_loss,
|
||||||
@ -1133,7 +1053,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* must be an existing record for the denomination key.
|
* must be an existing record for the denomination key.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param denom_pub_hash hash of the denomination public key
|
* @param denom_pub_hash hash of the denomination public key
|
||||||
* @param denom_balance value of coins outstanding with this denomination key
|
* @param denom_balance value of coins outstanding with this denomination key
|
||||||
* @param denom_loss value of coins redeemed that were not outstanding (effectively, negative @a denom_balance)
|
* @param denom_loss value of coins redeemed that were not outstanding (effectively, negative @a denom_balance)
|
||||||
@ -1144,7 +1063,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*update_denomination_balance)(void *cls,
|
(*update_denomination_balance)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct GNUNET_HashCode *denom_pub_hash,
|
const struct GNUNET_HashCode *denom_pub_hash,
|
||||||
const struct TALER_Amount *denom_balance,
|
const struct TALER_Amount *denom_balance,
|
||||||
const struct TALER_Amount *denom_loss,
|
const struct TALER_Amount *denom_loss,
|
||||||
@ -1157,7 +1075,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* Get information about a denomination key's balances.
|
* Get information about a denomination key's balances.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param denom_pub_hash hash of the denomination public key
|
* @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_balance value of coins outstanding with this denomination key
|
||||||
* @param[out] denom_loss value of coins redeemed that were not outstanding (effectively, negative @a denom_balance)
|
* @param[out] denom_loss value of coins redeemed that were not outstanding (effectively, negative @a denom_balance)
|
||||||
@ -1168,7 +1085,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*get_denomination_balance)(void *cls,
|
(*get_denomination_balance)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct GNUNET_HashCode *denom_pub_hash,
|
const struct GNUNET_HashCode *denom_pub_hash,
|
||||||
struct TALER_Amount *denom_balance,
|
struct TALER_Amount *denom_balance,
|
||||||
struct TALER_Amount *denom_loss,
|
struct TALER_Amount *denom_loss,
|
||||||
@ -1181,13 +1097,11 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* Delete information about a denomination key's balances.
|
* Delete information about a denomination key's balances.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param denom_pub_hash hash of the denomination public key
|
* @param denom_pub_hash hash of the denomination public key
|
||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*del_denomination_balance)(void *cls,
|
(*del_denomination_balance)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct GNUNET_HashCode *denom_pub_hash);
|
const struct GNUNET_HashCode *denom_pub_hash);
|
||||||
|
|
||||||
|
|
||||||
@ -1196,7 +1110,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* must not be an existing record for the exchange.
|
* must not be an existing record for the exchange.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param denom_balance value of coins outstanding with this denomination key
|
* @param denom_balance value of coins outstanding with this denomination key
|
||||||
* @param deposit_fee_balance total deposit fees collected for this DK
|
* @param deposit_fee_balance total deposit fees collected for this DK
|
||||||
@ -1210,7 +1123,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_balance_summary)(void *cls,
|
(*insert_balance_summary)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_Amount *denom_balance,
|
const struct TALER_Amount *denom_balance,
|
||||||
const struct TALER_Amount *deposit_fee_balance,
|
const struct TALER_Amount *deposit_fee_balance,
|
||||||
@ -1226,7 +1138,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* must be an existing record for the exchange.
|
* must be an existing record for the exchange.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param denom_balance value of coins outstanding with this denomination key
|
* @param denom_balance value of coins outstanding with this denomination key
|
||||||
* @param deposit_fee_balance total deposit fees collected for this DK
|
* @param deposit_fee_balance total deposit fees collected for this DK
|
||||||
@ -1240,7 +1151,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*update_balance_summary)(void *cls,
|
(*update_balance_summary)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_Amount *denom_balance,
|
const struct TALER_Amount *denom_balance,
|
||||||
const struct TALER_Amount *deposit_fee_balance,
|
const struct TALER_Amount *deposit_fee_balance,
|
||||||
@ -1255,7 +1165,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* Get information about an exchange's denomination balances.
|
* Get information about an exchange's denomination balances.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param[out] denom_balance value of coins outstanding with this denomination key
|
* @param[out] denom_balance value of coins outstanding with this denomination key
|
||||||
* @param[out] deposit_fee_balance total deposit fees collected for this DK
|
* @param[out] deposit_fee_balance total deposit fees collected for this DK
|
||||||
@ -1269,7 +1178,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*get_balance_summary)(void *cls,
|
(*get_balance_summary)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
struct TALER_Amount *denom_balance,
|
struct TALER_Amount *denom_balance,
|
||||||
struct TALER_Amount *deposit_fee_balance,
|
struct TALER_Amount *deposit_fee_balance,
|
||||||
@ -1285,7 +1193,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* revenue about a denomination key.
|
* revenue about a denomination key.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param denom_pub_hash hash of the denomination key
|
* @param denom_pub_hash hash of the denomination key
|
||||||
* @param revenue_timestamp when did this profit get realized
|
* @param revenue_timestamp when did this profit get realized
|
||||||
@ -1298,7 +1205,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_historic_denom_revenue)(
|
(*insert_historic_denom_revenue)(
|
||||||
void *cls,
|
void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct GNUNET_HashCode *denom_pub_hash,
|
const struct GNUNET_HashCode *denom_pub_hash,
|
||||||
struct GNUNET_TIME_Absolute revenue_timestamp,
|
struct GNUNET_TIME_Absolute revenue_timestamp,
|
||||||
@ -1311,7 +1217,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* of the given @a master_pub.
|
* of the given @a master_pub.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param cb function to call with the results
|
* @param cb function to call with the results
|
||||||
* @param cb_cls closure for @a cb
|
* @param cb_cls closure for @a cb
|
||||||
@ -1320,7 +1225,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*select_historic_denom_revenue)(
|
(*select_historic_denom_revenue)(
|
||||||
void *cls,
|
void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
TALER_AUDITORDB_HistoricDenominationRevenueDataCallback cb,
|
TALER_AUDITORDB_HistoricDenominationRevenueDataCallback cb,
|
||||||
void *cb_cls);
|
void *cb_cls);
|
||||||
@ -1330,7 +1234,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* Insert information about an exchange's historic revenue from reserves.
|
* Insert information about an exchange's historic revenue from reserves.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param start_time beginning of aggregated time interval
|
* @param start_time beginning of aggregated time interval
|
||||||
* @param end_time end of aggregated time interval
|
* @param end_time end of aggregated time interval
|
||||||
@ -1340,7 +1243,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_historic_reserve_revenue)(
|
(*insert_historic_reserve_revenue)(
|
||||||
void *cls,
|
void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
struct GNUNET_TIME_Absolute start_time,
|
struct GNUNET_TIME_Absolute start_time,
|
||||||
struct GNUNET_TIME_Absolute end_time,
|
struct GNUNET_TIME_Absolute end_time,
|
||||||
@ -1351,7 +1253,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* Return information about an exchange's historic revenue from reserves.
|
* Return information about an exchange's historic revenue from reserves.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param cb function to call with results
|
* @param cb function to call with results
|
||||||
* @param cb_cls closure for @a cb
|
* @param cb_cls closure for @a cb
|
||||||
@ -1360,7 +1261,6 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*select_historic_reserve_revenue)(
|
(*select_historic_reserve_revenue)(
|
||||||
void *cls,
|
void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
TALER_AUDITORDB_HistoricReserveRevenueDataCallback cb,
|
TALER_AUDITORDB_HistoricReserveRevenueDataCallback cb,
|
||||||
void *cb_cls);
|
void *cb_cls);
|
||||||
@ -1371,14 +1271,12 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* account balance.
|
* account balance.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param balance what the bank account balance of the exchange should show
|
* @param balance what the bank account balance of the exchange should show
|
||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_predicted_result)(void *cls,
|
(*insert_predicted_result)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_Amount *balance);
|
const struct TALER_Amount *balance);
|
||||||
|
|
||||||
@ -1388,14 +1286,12 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* must be an existing record for the exchange.
|
* must be an existing record for the exchange.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param balance what the bank account balance of the exchange should show
|
* @param balance what the bank account balance of the exchange should show
|
||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*update_predicted_result)(void *cls,
|
(*update_predicted_result)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_Amount *balance);
|
const struct TALER_Amount *balance);
|
||||||
|
|
||||||
@ -1404,14 +1300,12 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* Get an exchange's predicted balance.
|
* Get an exchange's predicted balance.
|
||||||
*
|
*
|
||||||
* @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 use
|
|
||||||
* @param master_pub master key of the exchange
|
* @param master_pub master key of the exchange
|
||||||
* @param[out] balance expected bank account balance of the exchange
|
* @param[out] balance expected bank account balance of the exchange
|
||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*get_predicted_balance)(void *cls,
|
(*get_predicted_balance)(void *cls,
|
||||||
struct TALER_AUDITORDB_Session *session,
|
|
||||||
const struct TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
struct TALER_Amount *balance);
|
struct TALER_Amount *balance);
|
||||||
|
|
||||||
|
@ -255,6 +255,7 @@ TALER_MHD_open_unix_path (const char *unix_path,
|
|||||||
GNUNET_free (un);
|
GNUNET_free (un);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
GNUNET_NETWORK_socket_bind (nh,
|
GNUNET_NETWORK_socket_bind (nh,
|
||||||
(void *) un,
|
(void *) un,
|
||||||
@ -446,6 +447,18 @@ TALER_MHD_bind (const struct GNUNET_CONFIGURATION_Handle *cfg,
|
|||||||
freeaddrinfo (res);
|
freeaddrinfo (res);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
const int on = 1;
|
||||||
|
|
||||||
|
if (GNUNET_OK !=
|
||||||
|
GNUNET_NETWORK_socket_setsockopt (nh,
|
||||||
|
SOL_SOCKET,
|
||||||
|
SO_REUSEPORT,
|
||||||
|
&on,
|
||||||
|
sizeof(on)))
|
||||||
|
GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING,
|
||||||
|
"setsockopt");
|
||||||
|
}
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
GNUNET_NETWORK_socket_bind (nh,
|
GNUNET_NETWORK_socket_bind (nh,
|
||||||
res->ai_addr,
|
res->ai_addr,
|
||||||
|
@ -46,6 +46,8 @@ main (int argc,
|
|||||||
GNUNET_log_setup ("test-payto",
|
GNUNET_log_setup ("test-payto",
|
||||||
"WARNING",
|
"WARNING",
|
||||||
NULL);
|
NULL);
|
||||||
|
GNUNET_assert (NULL ==
|
||||||
|
TALER_iban_validate ("FR1420041010050500013M02606"));
|
||||||
r = TALER_xtalerbank_account_from_payto (
|
r = TALER_xtalerbank_account_from_payto (
|
||||||
"payto://x-taler-bank/localhost:1080/alice");
|
"payto://x-taler-bank/localhost:1080/alice");
|
||||||
CHECK ("alice",
|
CHECK ("alice",
|
||||||
|
Loading…
Reference in New Issue
Block a user