stylefixes

This commit is contained in:
Christian Grothoff 2020-03-21 19:46:21 +01:00
parent 0d2bf1a75e
commit bad9c719f8
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
4 changed files with 71 additions and 91 deletions

View File

@ -131,13 +131,12 @@ static struct TALER_Amount total_bad_sig_loss;
* profitable for the exchange, and 0 if it is unclear * profitable for the exchange, and 0 if it is unclear
*/ */
static void static void
report_amount_arithmetic_inconsistency (const char *operation, report_amount_arithmetic_inconsistency (
uint64_t rowid, const char *operation,
const struct uint64_t rowid,
TALER_Amount *exchange, const struct TALER_Amount *exchange,
const struct const struct TALER_Amount *auditor,
TALER_Amount *auditor, int profitable)
int profitable)
{ {
struct TALER_Amount delta; struct TALER_Amount delta;
struct TALER_Amount *target; struct TALER_Amount *target;
@ -194,15 +193,12 @@ report_amount_arithmetic_inconsistency (const char *operation,
* profitable for the exchange, and 0 if it is unclear * profitable for the exchange, and 0 if it is unclear
*/ */
static void static void
report_coin_arithmetic_inconsistency (const char *operation, report_coin_arithmetic_inconsistency (
const struct const char *operation,
TALER_CoinSpendPublicKeyP * const struct TALER_CoinSpendPublicKeyP *coin_pub,
coin_pub, const struct TALER_Amount *exchange,
const struct const struct TALER_Amount *auditor,
TALER_Amount *exchange, int profitable)
const struct
TALER_Amount *auditor,
int profitable)
{ {
struct TALER_Amount delta; struct TALER_Amount delta;
struct TALER_Amount *target; struct TALER_Amount *target;
@ -384,25 +380,14 @@ struct WireCheckContext
* @return #GNUNET_OK on success, #GNUNET_SYSERR on error * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
*/ */
static int static int
check_transaction_history_for_deposit (const struct check_transaction_history_for_deposit (
TALER_CoinSpendPublicKeyP * const struct TALER_CoinSpendPublicKeyP *coin_pub,
coin_pub, const struct GNUNET_HashCode *h_contract_terms,
const struct const struct TALER_MerchantPublicKeyP *merchant_pub,
GNUNET_HashCode * const struct TALER_DenominationKeyValidityPS *issue,
h_contract_terms, const struct TALER_EXCHANGEDB_TransactionList *tl_head,
const struct struct TALER_Amount *merchant_gain,
TALER_MerchantPublicKeyP * struct TALER_Amount *deposit_gain)
merchant_pub,
const struct
TALER_DenominationKeyValidityPS
*issue,
const struct
TALER_EXCHANGEDB_TransactionList
*tl_head,
struct TALER_Amount *
merchant_gain,
struct TALER_Amount *
deposit_gain)
{ {
struct TALER_Amount expenditures; struct TALER_Amount expenditures;
struct TALER_Amount refunds; struct TALER_Amount refunds;
@ -1272,14 +1257,13 @@ analyze_aggregations (void *cls)
if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qsp) if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qsp)
{ {
GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
_ ( "First analysis using this auditor, starting audit from scratch\n");
"First analysis using this auditor, starting audit from scratch\n"));
} }
else else
{ {
ppa_start = ppa; ppa_start = ppa;
GNUNET_log (GNUNET_ERROR_TYPE_INFO, GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_ ("Resuming aggregation audit at %llu\n"), "Resuming aggregation audit at %llu\n",
(unsigned long long) ppa.last_wire_out_serial_id); (unsigned long long) ppa.last_wire_out_serial_id);
} }
@ -1373,20 +1357,20 @@ analyze_aggregations (void *cls)
* *
* @param cls closure * @param cls closure
* @param args remaining command-line arguments * @param args remaining command-line arguments
* @param TALER_ARL_cfgfile name of the configuration file used (for saving, can be NULL!) * @param cfgfile name of the configuration file used (for saving, can be NULL!)
* @param c configuration * @param c configuration
*/ */
static void static void
run (void *cls, run (void *cls,
char *const *args, char *const *args,
const char *TALER_ARL_cfgfile, const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *c) const struct GNUNET_CONFIGURATION_Handle *c)
{ {
json_t *report; json_t *report;
(void) cls; (void) cls;
(void) args; (void) args;
(void) TALER_ARL_cfgfile; (void) cfgfile;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Launching auditor\n"); "Launching auditor\n");
if (GNUNET_OK != if (GNUNET_OK !=

View File

@ -2116,20 +2116,20 @@ analyze_coins (void *cls)
* *
* @param cls closure * @param cls closure
* @param args remaining command-line arguments * @param args remaining command-line arguments
* @param TALER_ARL_cfgfile name of the configuration file used (for saving, can be NULL!) * @param cfgfile name of the configuration file used (for saving, can be NULL!)
* @param c configuration * @param c configuration
*/ */
static void static void
run (void *cls, run (void *cls,
char *const *args, char *const *args,
const char *TALER_ARL_cfgfile, const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *c) const struct GNUNET_CONFIGURATION_Handle *c)
{ {
json_t *report; json_t *report;
(void) cls; (void) cls;
(void) args; (void) args;
(void) TALER_ARL_cfgfile; (void) cfgfile;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Launching auditor\n"); "Launching auditor\n");
if (GNUNET_OK != if (GNUNET_OK !=

View File

@ -160,13 +160,12 @@ static struct TALER_Amount total_bad_sig_loss;
* profitable for the exchange, and 0 if it is unclear * profitable for the exchange, and 0 if it is unclear
*/ */
static void static void
report_amount_arithmetic_inconsistency (const char *operation, report_amount_arithmetic_inconsistency (
uint64_t rowid, const char *operation,
const struct uint64_t rowid,
TALER_Amount *exchange, const struct TALER_Amount *exchange,
const struct const struct TALER_Amount *auditor,
TALER_Amount *auditor, int profitable)
int profitable)
{ {
struct TALER_Amount delta; struct TALER_Amount delta;
struct TALER_Amount *target; struct TALER_Amount *target;
@ -649,16 +648,16 @@ handle_reserve_out (void *cls,
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
*/ */
static int static int
handle_recoup_by_reserve (void *cls, handle_recoup_by_reserve (
uint64_t rowid, void *cls,
struct GNUNET_TIME_Absolute timestamp, uint64_t rowid,
const struct TALER_Amount *amount, struct GNUNET_TIME_Absolute timestamp,
const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_Amount *amount,
const struct TALER_CoinPublicInfo *coin, const struct TALER_ReservePublicKeyP *reserve_pub,
const struct TALER_DenominationPublicKey *denom_pub, const struct TALER_CoinPublicInfo *coin,
const struct TALER_CoinSpendSignatureP *coin_sig, const struct TALER_DenominationPublicKey *denom_pub,
const struct const struct TALER_CoinSpendSignatureP *coin_sig,
TALER_DenominationBlindingKeyP *coin_blind) const struct TALER_DenominationBlindingKeyP *coin_blind)
{ {
struct ReserveContext *rc = cls; struct ReserveContext *rc = cls;
struct GNUNET_HashCode key; struct GNUNET_HashCode key;
@ -885,15 +884,15 @@ get_closing_fee (const char *receiver_account,
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
*/ */
static int static int
handle_reserve_closed (void *cls, handle_reserve_closed (
uint64_t rowid, void *cls,
struct GNUNET_TIME_Absolute execution_date, uint64_t rowid,
const struct TALER_Amount *amount_with_fee, struct GNUNET_TIME_Absolute execution_date,
const struct TALER_Amount *closing_fee, const struct TALER_Amount *amount_with_fee,
const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_Amount *closing_fee,
const char *receiver_account, const struct TALER_ReservePublicKeyP *reserve_pub,
const struct const char *receiver_account,
TALER_WireTransferIdentifierRawP *transfer_details) const struct TALER_WireTransferIdentifierRawP *transfer_details)
{ {
struct ReserveContext *rc = cls; struct ReserveContext *rc = cls;
struct GNUNET_HashCode key; struct GNUNET_HashCode key;
@ -1295,14 +1294,13 @@ analyze_reserves (void *cls)
if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qsp) if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qsp)
{ {
GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
_ ( "First analysis using this auditor, starting audit from scratch\n");
"First analysis using this auditor, starting audit from scratch\n"));
} }
else else
{ {
ppr_start = ppr; ppr_start = ppr;
GNUNET_log (GNUNET_ERROR_TYPE_INFO, GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_ ("Resuming reserve audit at %llu/%llu/%llu/%llu\n"), "Resuming reserve audit at %llu/%llu/%llu/%llu\n",
(unsigned long long) ppr.last_reserve_in_serial_id, (unsigned long long) ppr.last_reserve_in_serial_id,
(unsigned long long) ppr.last_reserve_out_serial_id, (unsigned long long) ppr.last_reserve_out_serial_id,
(unsigned long long) ppr.last_reserve_recoup_serial_id, (unsigned long long) ppr.last_reserve_recoup_serial_id,
@ -1420,7 +1418,7 @@ analyze_reserves (void *cls)
return qs; return qs;
} }
GNUNET_log (GNUNET_ERROR_TYPE_INFO, GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_ ("Concluded reserve audit step at %llu/%llu/%llu/%llu\n"), "Concluded reserve audit step at %llu/%llu/%llu/%llu\n",
(unsigned long long) ppr.last_reserve_in_serial_id, (unsigned long long) ppr.last_reserve_in_serial_id,
(unsigned long long) ppr.last_reserve_out_serial_id, (unsigned long long) ppr.last_reserve_out_serial_id,
(unsigned long long) ppr.last_reserve_recoup_serial_id, (unsigned long long) ppr.last_reserve_recoup_serial_id,
@ -1434,18 +1432,18 @@ analyze_reserves (void *cls)
* *
* @param cls closure * @param cls closure
* @param args remaining command-line arguments * @param args remaining command-line arguments
* @param TALER_ARL_cfgfile name of the configuration file used (for saving, can be NULL!) * @param cfgfile name of the configuration file used (for saving, can be NULL!)
* @param c configuration * @param c configuration
*/ */
static void static void
run (void *cls, run (void *cls,
char *const *args, char *const *args,
const char *TALER_ARL_cfgfile, const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *c) const struct GNUNET_CONFIGURATION_Handle *c)
{ {
(void) cls; (void) cls;
(void) args; (void) args;
(void) TALER_ARL_cfgfile; (void) cfgfile;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Launching auditor\n"); "Launching auditor\n");
if (GNUNET_OK != if (GNUNET_OK !=
@ -1501,22 +1499,20 @@ run (void *cls,
GNUNET_assert (NULL != GNUNET_assert (NULL !=
(report_row_inconsistencies = json_array ())); (report_row_inconsistencies = json_array ()));
GNUNET_assert (NULL != GNUNET_assert (NULL !=
(denomination_key_validity_withdraw_inconsistencies = (denomination_key_validity_withdraw_inconsistencies
json_array ())); = json_array ()));
GNUNET_assert (NULL != GNUNET_assert (NULL !=
(report_reserve_balance_summary_wrong_inconsistencies (report_reserve_balance_summary_wrong_inconsistencies
= = json_array ()));
json_array ()));
GNUNET_assert (NULL != GNUNET_assert (NULL !=
(report_reserve_balance_insufficient_inconsistencies (report_reserve_balance_insufficient_inconsistencies
= = json_array ()));
json_array ()));
GNUNET_assert (NULL != GNUNET_assert (NULL !=
(report_reserve_not_closed_inconsistencies = (report_reserve_not_closed_inconsistencies
json_array ())); = json_array ()));
GNUNET_assert (NULL != GNUNET_assert (NULL !=
(report_amount_arithmetic_inconsistencies = (report_amount_arithmetic_inconsistencies
json_array ())); = json_array ()));
GNUNET_assert (NULL != GNUNET_assert (NULL !=
(report_bad_sig_losses = json_array ())); (report_bad_sig_losses = json_array ()));
if (GNUNET_OK != if (GNUNET_OK !=

View File

@ -2084,20 +2084,20 @@ process_account_cb (void *cls,
* *
* @param cls closure * @param cls closure
* @param args remaining command-line arguments * @param args remaining command-line arguments
* @param TALER_ARL_cfgfile name of the configuration file used (for saving, can be NULL!) * @param cfgfile name of the configuration file used (for saving, can be NULL!)
* @param c configuration * @param c configuration
*/ */
static void static void
run (void *cls, run (void *cls,
char *const *args, char *const *args,
const char *TALER_ARL_cfgfile, const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *c) const struct GNUNET_CONFIGURATION_Handle *c)
{ {
(void) cls; (void) cls;
(void) args; (void) args;
(void) TALER_ARL_cfgfile; (void) cfgfile;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Launching auditor\n"); "Launching wire auditor\n");
if (GNUNET_OK != if (GNUNET_OK !=
TALER_ARL_init (c)) TALER_ARL_init (c))
{ {