summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/auditor/taler-helper-auditor-aggregation.c134
-rw-r--r--src/auditor/taler-helper-auditor-coins.c64
-rw-r--r--src/auditor/taler-helper-auditor-reserves.c86
3 files changed, 7 insertions, 277 deletions
diff --git a/src/auditor/taler-helper-auditor-aggregation.c b/src/auditor/taler-helper-auditor-aggregation.c
index 58e884558..78a522e4b 100644
--- a/src/auditor/taler-helper-auditor-aggregation.c
+++ b/src/auditor/taler-helper-auditor-aggregation.c
@@ -27,8 +27,6 @@
#include "taler_signatures.h"
#include "taler_dbevents.h"
#include "report-lib.h"
-#include <inttypes.h>
-
/**
* Return value from main().
@@ -159,8 +157,6 @@ report_amount_arithmetic_inconsistency (
const struct TALER_Amount *auditor,
int profitable)
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "getting into amount arithmetc cb\n");
struct TALER_Amount delta;
struct TALER_Amount *target;
enum GNUNET_DB_QueryStatus qs;
@@ -195,8 +191,6 @@ report_amount_arithmetic_inconsistency (
{
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " storing amount arithmetic inconsisteny blablubbib\n");
TALER_ARL_report (report_amount_arithmetic_inconsistencies,
@@ -244,8 +238,6 @@ report_coin_arithmetic_inconsistency (
const struct TALER_Amount *auditor,
int profitable)
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "getting into airthmetic incons\n");
struct TALER_Amount delta;
struct TALER_Amount *target;
enum GNUNET_DB_QueryStatus qs;
@@ -477,9 +469,6 @@ check_transaction_history_for_deposit (
enum GNUNET_DB_QueryStatus qs;
struct TALER_AUDITORDB_RowInconsistency ri;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "getting into check transac history for dep \n");
-
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Checking transaction history of coin %s\n",
TALER_B2S (coin_pub));
@@ -865,14 +854,10 @@ wire_transfer_information_cb (
TALER_payto_hash (account_pay_uri,
&hpt);
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "getting into wire transfer imfo cb\n");
if (0 !=
GNUNET_memcmp (&hpt,
h_payto))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "found incons wire targets hpayto \n\n");
report_row_inconsistency ("wire_targets",
rowid,
"h-payto does not match payto URI");
@@ -885,8 +870,6 @@ wire_transfer_information_cb (
{
struct TALER_Amount balance;
struct TALER_DenominationHashP h_denom_pub;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " err1\n");
qs = TALER_ARL_edb->get_coin_transactions (TALER_ARL_edb->cls,
coin_pub,
0,
@@ -900,15 +883,11 @@ wire_transfer_information_cb (
(NULL == tl))
{
wcc->qs = qs;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "found incons no transca his\n\n");
report_row_inconsistency ("aggregation",
rowid,
"no transaction history for coin claimed in aggregation");
return;
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " 1\n");
qs = TALER_ARL_edb->get_known_coin (TALER_ARL_edb->cls,
coin_pub,
&coin);
@@ -924,8 +903,6 @@ wire_transfer_information_cb (
tl);
return;
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " 2\n");
qs = TALER_ARL_get_denomination_info_by_hash (&coin.denom_pub_hash,
&issue);
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs)
@@ -941,8 +918,6 @@ wire_transfer_information_cb (
wcc->qs = qs;
return;
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " 3\n");
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Testing coin `%s' for validity\n",
TALER_B2S (&coin.coin_pub));
@@ -985,8 +960,6 @@ wire_transfer_information_cb (
"coin denomination signature invalid");
return;
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " 4\n");
TALER_denom_sig_free (&coin.denom_sig);
GNUNET_assert (NULL != issue); /* mostly to help static analysis */
/* Check transaction history to see if it supports aggregate
@@ -1011,8 +984,6 @@ wire_transfer_information_cb (
"Coin contributes %s to aggregate (deposits after fees and refunds)\n",
TALER_amount2s (&computed_value));
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " 6\n");
struct TALER_Amount coin_value_without_fee;
if (TALER_ARL_SR_INVALID_NEGATIVE ==
@@ -1020,8 +991,6 @@ wire_transfer_information_cb (
coin_value,
deposit_fee))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " 6\n");
wcc->qs = GNUNET_DB_STATUS_HARD_ERROR;
report_amount_arithmetic_inconsistency (
"aggregation (fee structure)",
@@ -1031,14 +1000,10 @@ wire_transfer_information_cb (
-1);
return;
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " 7\n");
if (0 !=
TALER_amount_cmp (&total_deposit_without_refunds,
&coin_value_without_fee))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " 8\n");
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Expected coin contribution of %s to aggregate\n",
TALER_amount2s (&coin_value_without_fee));
@@ -1050,14 +1015,10 @@ wire_transfer_information_cb (
-1);
}
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " 9\n");
/* Check other details of wire transfer match */
if (0 != strcmp (account_pay_uri,
wcc->payto_uri))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " 10\n");
report_row_inconsistency ("aggregation",
rowid,
"target of outgoing wire transfer do not match hash of wire from deposit");
@@ -1066,8 +1027,6 @@ wire_transfer_information_cb (
!=,
wcc->date))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " 11\n");
/* This should be impossible from database constraints */
GNUNET_break (0);
report_row_inconsistency ("aggregation",
@@ -1077,16 +1036,12 @@ wire_transfer_information_cb (
/* Add coin's contribution to total aggregate value */
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " 12\n");
struct TALER_Amount res;
TALER_ARL_amount_add (&res,
&wcc->total_deposits,
&computed_value);
wcc->total_deposits = res;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " 13\n");
}
}
@@ -1269,17 +1224,6 @@ check_wire_out_cb (void *cls,
char *method;
struct TALER_AUDITORDB_WireOutInconsistency woi;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " 3checking agg wire fee revenue set zero %s\n\n",
- TALER_amount_to_string (&TALER_ARL_USE_AB (
- aggregation_total_wire_fee_revenue)));
-
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "\n rowid in method %" PRIu64 "\n", rowid);
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "rowidto assert %" PRIu64 "\n", TALER_ARL_USE_PP (
- aggregation_last_wire_out_serial_id));
-
/* should be monotonically increasing */
GNUNET_assert (rowid >=
TALER_ARL_USE_PP (aggregation_last_wire_out_serial_id));
@@ -1292,8 +1236,6 @@ check_wire_out_cb (void *cls,
GNUNET_TIME_timestamp2s (date));
if (NULL == (method = TALER_payto_get_method (payto_uri)))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "found inconsistency\n\n");
report_row_inconsistency ("wire_out",
rowid,
"specified wire address lacks method");
@@ -1307,8 +1249,6 @@ check_wire_out_cb (void *cls,
TALER_amount_set_zero (amount->currency,
&wcc.total_deposits));
wcc.payto_uri = payto_uri;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "looking up wire transfer\n");
qs = TALER_ARL_edb->lookup_wire_transfer (TALER_ARL_edb->cls,
wtid,
&wire_transfer_information_cb,
@@ -1373,18 +1313,6 @@ check_wire_out_cb (void *cls,
TALER_ARL_amount_subtract (&exchange_gain,
&wcc.total_deposits,
&final_amount);
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " taler amount to string 1%s\n\n",
- TALER_amount_to_string (&TALER_ARL_USE_AB (
- aggregation_total_wire_fee_revenue)));
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " taler amount to string 2%s\n\n",
- TALER_amount_to_string (&exchange_gain));
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " 4checking agg wire fee revenue set zero %s\n\n",
- TALER_amount_to_string (&TALER_ARL_USE_AB (
- aggregation_total_wire_fee_revenue)));
-
/* Sum up aggregation fees (we simply include the rounding gains) */
TALER_ARL_amount_add (&TAC_aggregation_total_wire_fee_revenue,
@@ -1471,10 +1399,6 @@ analyze_aggregations (void *cls)
enum GNUNET_DB_QueryStatus qsp;
char progress_exists = 1;
char balance_exists = 1;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " 2checking agg wire fee revenue set zero %s\n\n",
- TALER_amount_to_string (&TALER_ARL_USE_AB (
- aggregation_total_wire_fee_revenue)));
(void) cls;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -1512,15 +1436,8 @@ analyze_aggregations (void *cls)
TALER_ARL_adb->cls,
TALER_ARL_GET_AB (aggregation_total_wire_fee_revenue),
NULL);
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " fees %s: \n", TALER_amount_to_string (&TALER_ARL_USE_AB (
- aggregation_total_wire_fee_revenue)));
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " woo qsx = %d\n", qsx);
if (0 > qsx)
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "in here error\n");
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qsx);
return qsx;
}
@@ -1528,23 +1445,12 @@ analyze_aggregations (void *cls)
if (GNUNET_NO == TALER_amount_is_valid (&TALER_ARL_USE_AB (
aggregation_total_wire_fee_revenue)))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " woo found none adding some\n");
GNUNET_assert (GNUNET_OK ==
TALER_amount_set_zero (TALER_ARL_currency,
&TALER_ARL_USE_AB (
aggregation_total_wire_fee_revenue)));
balance_exists = 0;
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "here no error\n");
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "same oold %" PRIu64 "\n", TALER_ARL_USE_PP (
- aggregation_last_wire_out_serial_id));
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " 22checking agg wire fee revenue set zero %s\n\n",
- TALER_amount_to_string (&TALER_ARL_USE_AB (
- aggregation_total_wire_fee_revenue)));
ac.qs = GNUNET_DB_STATUS_SUCCESS_ONE_RESULT;
qs = TALER_ARL_edb->select_wire_out_above_serial_id (
@@ -1642,12 +1548,8 @@ analyze_aggregations (void *cls)
return qs;
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " test: %d\n", balance_exists);
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == qsx && balance_exists == 0)
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " no balance found\n");
ac.qs = TALER_ARL_adb->insert_balance (
TALER_ARL_adb->cls,
TALER_ARL_SET_AB (aggregation_total_wire_fee_revenue),
@@ -1655,34 +1557,20 @@ analyze_aggregations (void *cls)
}
else if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == qsx && balance_exists == 1)
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " update balance found\n");
ac.qs = TALER_ARL_adb->update_balance (
TALER_ARL_adb->cls,
TALER_ARL_SET_AB (aggregation_total_wire_fee_revenue),
NULL);
}
- else
- {
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " else\n");
- }
if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == ac.qs)
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " no result, surprise..\n");
- if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != ac.qs)
- {
- GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == ac.qs);
- return ac.qs;
- }
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " 222333same oold %" PRIu64 "\n", TALER_ARL_USE_PP (
- aggregation_last_wire_out_serial_id));
+ if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != ac.qs)
+ {
+ GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == ac.qs);
+ return ac.qs;
+ }
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == qsp && progress_exists == 1)
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " update progress found\n");
qs = TALER_ARL_adb->update_auditor_progress (
TALER_ARL_adb->cls,
TALER_ARL_SET_PP (aggregation_last_wire_out_serial_id),
@@ -1690,7 +1578,6 @@ analyze_aggregations (void *cls)
}
else
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, " insert progress found\n");
qs = TALER_ARL_adb->insert_auditor_progress (
TALER_ARL_adb->cls,
TALER_ARL_SET_PP (aggregation_last_wire_out_serial_id),
@@ -1738,10 +1625,6 @@ db_notify (void *cls,
TALER_amount_set_zero (TALER_ARL_currency,
&TALER_ARL_USE_AB (
aggregation_total_wire_fee_revenue)));
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " 1checking agg wire fee revenue set zero %s\n\n",
- TALER_amount_to_string (&TALER_ARL_USE_AB (
- aggregation_total_wire_fee_revenue)));
GNUNET_assert (GNUNET_OK ==
TALER_amount_set_zero (TALER_ARL_currency,
&total_wire_out_delta_plus));
@@ -1886,10 +1769,6 @@ run (void *cls,
TALER_amount_set_zero (TALER_ARL_currency,
&TALER_ARL_USE_AB (
aggregation_total_wire_fee_revenue)));
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " 1checking agg wire fee revenue set zero %s\n\n",
- TALER_amount_to_string (&TALER_ARL_USE_AB (
- aggregation_total_wire_fee_revenue)));
GNUNET_assert (GNUNET_OK ==
TALER_amount_set_zero (TALER_ARL_currency,
&total_wire_out_delta_plus));
@@ -2001,9 +1880,6 @@ run (void *cls,
GNUNET_JSON_pack_array_steal (
"wire_fee_time_inconsistencies",
report_fee_time_inconsistencies)));
-
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "done al capone\n");
}
diff --git a/src/auditor/taler-helper-auditor-coins.c b/src/auditor/taler-helper-auditor-coins.c
index 60abdea6d..97ae0bb85 100644
--- a/src/auditor/taler-helper-auditor-coins.c
+++ b/src/auditor/taler-helper-auditor-coins.c
@@ -548,23 +548,17 @@ check_coin_history (const struct TALER_CoinSpendPublicKeyP *coin_pub,
{
struct TALER_Amount balance;
struct TALER_DenominationHashP h_denom_pub;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 151xx\n");
- /*qs = TALER_ARL_edb->get_coin_transactions (TALER_ARL_edb->cls,
+ qs = TALER_ARL_edb->get_coin_transactions (TALER_ARL_edb->cls,
coin_pub,
0,
0,
&etag_out,
&balance,
&h_denom_pub,
- &tl);*/
+ &tl);
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 151xxxxx\n");
/*if (0 >= qs)
return qs;*/
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 151xxxxxxxx\n");
GNUNET_assert (GNUNET_OK ==
TALER_amount_set_zero (value->currency,
&refunded));
@@ -575,8 +569,6 @@ check_coin_history (const struct TALER_CoinSpendPublicKeyP *coin_pub,
TALER_amount_set_zero (value->currency,
&deposit_fee));
have_refund = false;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 152xx\n");
for (struct TALER_EXCHANGEDB_TransactionList *pos = tl;
NULL != pos;
pos = pos->next)
@@ -646,8 +638,6 @@ check_coin_history (const struct TALER_CoinSpendPublicKeyP *coin_pub,
break;
} /* switch (pos->type) */
} /* for (...) */
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 153xx\n");
if (have_refund)
{
/* If we gave any refund, also discount ONE deposit fee */
@@ -665,8 +655,6 @@ check_coin_history (const struct TALER_CoinSpendPublicKeyP *coin_pub,
{
/* spent > total: bad */
struct TALER_Amount loss;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 155x\n");
TALER_ARL_amount_subtract (&loss,
&spent,
&total);
@@ -680,12 +668,8 @@ check_coin_history (const struct TALER_CoinSpendPublicKeyP *coin_pub,
&total,
-1);
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 156x\n");
cache_history (coin_pub,
tl);
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 157x\n");
return qs;
}
@@ -1220,12 +1204,8 @@ check_known_coin (
struct TALER_CoinPublicInfo ci;
enum GNUNET_DB_QueryStatus qs;
struct TALER_AUDITORDB_BadSigLosses bsl;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 151\n");
if (NULL == get_cached_history (coin_pub))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 15x\n");
qs = check_coin_history (coin_pub,
rowid,
operation,
@@ -1239,8 +1219,6 @@ check_known_coin (
}
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 152\n");
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Checking denomination signature on %s\n",
TALER_B2S (coin_pub));
qs = TALER_ARL_edb->get_known_coin (TALER_ARL_edb->cls,
@@ -1251,8 +1229,6 @@ check_known_coin (
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
return qs;
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 153\n");
if (GNUNET_YES !=
TALER_test_coin_valid (&ci,
denom_pub))
@@ -1265,8 +1241,6 @@ check_known_coin (
qs = TALER_ARL_adb->insert_bad_sig_losses (
TALER_ARL_adb->cls,
&bsl);
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 154\n");
if (qs < 0)
{
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
@@ -1390,13 +1364,9 @@ refresh_session_cb (void *cls,
GNUNET_assert (rowid >=
TALER_ARL_USE_PP (coins_melt_serial_id)); /* should be monotonically increasing */
TALER_ARL_USE_PP (coins_melt_serial_id) = rowid + 1;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 13\n");
qs = TALER_ARL_get_denomination_info (denom_pub,
&issue,
NULL);
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 140\n");
if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs)
{
report_row_inconsistency ("melt",
@@ -1406,36 +1376,24 @@ refresh_session_cb (void *cls,
return GNUNET_SYSERR;
return GNUNET_OK;
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 141\n");
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs)
{
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
cc->qs = qs;
return GNUNET_SYSERR;
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 142\n");
qs = check_known_coin ("melt",
issue,
rowid,
coin_pub,
denom_pub,
amount_with_fee);
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 143\n");
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs)
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 144\n");
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
cc->qs = qs;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 145\n");
return GNUNET_SYSERR;
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 15\n");
/* verify melt signature */
{
struct TALER_DenominationHashP h_denom_pub;
@@ -1460,8 +1418,6 @@ refresh_session_cb (void *cls,
qs = TALER_ARL_adb->insert_bad_sig_losses (
TALER_ARL_adb->cls,
&bsl);
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 16\n");
if (qs < 0)
{
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
@@ -2837,8 +2793,6 @@ analyze_coins (void *cls)
coin_balance_risk)));
balance_exists = 0;
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 2\n");
/* process withdrawals */
if (0 >
(qs = TALER_ARL_edb->select_withdrawals_above_serial_id (
@@ -2853,8 +2807,6 @@ analyze_coins (void *cls)
}
if (0 > cc.qs)
return cc.qs;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 3\n");
/* process refunds */
if (0 >
(qs = TALER_ARL_edb->select_refunds_above_serial_id (
@@ -2868,8 +2820,6 @@ analyze_coins (void *cls)
}
if (0 > cc.qs)
return cc.qs;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 1\n");
/* process purse_refunds */
if (0 >
(qs = TALER_ARL_edb->select_purse_decisions_above_serial_id (
@@ -2911,8 +2861,6 @@ analyze_coins (void *cls)
}
if (0 > cc.qs)
return cc.qs;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 11\n");
/* process refreshes */
if (0 >
(qs = TALER_ARL_edb->select_refreshes_above_serial_id (
@@ -2926,8 +2874,6 @@ analyze_coins (void *cls)
}
if (0 > cc.qs)
return cc.qs;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 12\n");
/* process deposits */
if (0 >
(qs = TALER_ARL_edb->select_coin_deposits_above_serial_id (
@@ -2941,8 +2887,6 @@ analyze_coins (void *cls)
}
if (0 > cc.qs)
return cc.qs;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 13\n");
/* process purse_deposits */
if (0 >
(qs = TALER_ARL_edb->select_purse_deposits_above_serial_id (
@@ -2956,8 +2900,6 @@ analyze_coins (void *cls)
}
if (0 > cc.qs)
return cc.qs;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 14\n");
/* sync 'cc' back to disk */
cc.qs = GNUNET_DB_STATUS_SUCCESS_ONE_RESULT;
GNUNET_CONTAINER_multihashmap_iterate (cc.denom_summaries,
@@ -2971,8 +2913,6 @@ analyze_coins (void *cls)
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == cc.qs);
return cc.qs;
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " --- 15\n");
// TODO: fix and do it right
struct TALER_AUDITORDB_Balances b;
b.balance_key = "total_refresh_hanging";
diff --git a/src/auditor/taler-helper-auditor-reserves.c b/src/auditor/taler-helper-auditor-reserves.c
index 4d448bf87..210356a06 100644
--- a/src/auditor/taler-helper-auditor-reserves.c
+++ b/src/auditor/taler-helper-auditor-reserves.c
@@ -214,7 +214,6 @@ report_amount_arithmetic_inconsistency (
auditor,
exchange);
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, "-- %s operation \n", operation);
aai.profitable = profitable;
aai.operation = (char *) operation;
aai.exchange_amount = *exchange;
@@ -1468,34 +1467,11 @@ verify_reserve_balance (void *cls,
TALER_ARL_amount_add (&mbalance,
&rs->total_in,
&rs->prev_balance.reserve_balance);
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " nbalance: %s\n",
- TALER_amount_to_string (&nbalance));
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " mbalance: %s\n",
- TALER_amount_to_string (&nbalance));
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " total out: %s\n",
- TALER_amount_to_string (&rs->total_out));
-
if (TALER_ARL_SR_INVALID_NEGATIVE ==
TALER_ARL_amount_subtract_neg (&nbalance,
&mbalance,
&rs->total_out))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " Going in here because it can't be correct: %s\n",
- TALER_amount_to_string (&nbalance));
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " nbalance: %s\n",
- TALER_amount_to_string (&nbalance));
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " mbalance: %s\n",
- TALER_amount_to_string (&nbalance));
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " total out: %s\n",
- TALER_amount_to_string (&rs->total_out));
-
struct TALER_Amount loss;
@@ -1539,17 +1515,8 @@ verify_reserve_balance (void *cls,
rs->curr_balance.reserve_balance = nbalance;
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "1curr_balance.reserve_balance: %s\n",
- TALER_amount_to_string (&rs->curr_balance.reserve_balance));
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "1nbalance: %s\n",
- TALER_amount_to_string (&nbalance));
-
if (internal_checks)
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " Going in here because internal checks is active\n");
/* Now check OUR balance calculation vs. the one the exchange has
in its database. This can only be done when we are doing an
internal audit, as otherwise the balance of the 'reserves' table
@@ -1570,9 +1537,6 @@ verify_reserve_balance (void *cls,
rbiig.reserve_pub = rs->reserve_pub.eddsa_pub;
rbiig.inconsistency_amount = nbalance;
rbiig.inconsistency_gain = true;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "1inconsistency_amount: %s\n",
- TALER_amount_to_string (&rbiig.inconsistency_amount));
qs = TALER_ARL_adb->insert_reserve_balance_insufficient_inconsistency (
TALER_ARL_adb->cls,
&rbiig);
@@ -1582,9 +1546,6 @@ verify_reserve_balance (void *cls,
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "2nbalance: %s\n",
- TALER_amount_to_string (&nbalance));
TALER_ARL_report (report_reserve_balance_insufficient_inconsistencies,
GNUNET_JSON_PACK (
@@ -1605,9 +1566,6 @@ verify_reserve_balance (void *cls,
if (0 != TALER_amount_cmp (&rs->curr_balance.reserve_balance,
&reserve.balance))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "3nbalance: %s\n",
- TALER_amount_to_string (&nbalance));
struct TALER_Amount delta;
@@ -1648,14 +1606,6 @@ verify_reserve_balance (void *cls,
rbswi.auditor_amount = rs->curr_balance.reserve_balance;
rbswi.reserve_pub = rs->reserve_pub;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "--------exchange balance: %s\n",
- TALER_amount_to_string (&reserve.balance));
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "--------auditor balance: %s\n",
- TALER_amount_to_string (&rs->curr_balance.reserve_balance));
-
-
qs = TALER_ARL_adb->insert_reserve_balance_summary_wrong_inconsistency (
TALER_ARL_adb->cls,
&rbswi);
@@ -1665,9 +1615,6 @@ verify_reserve_balance (void *cls,
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "4nbalance: %s\n",
- TALER_amount_to_string (&nbalance));
TALER_ARL_report (report_reserve_balance_summary_wrong_inconsistencies,
GNUNET_JSON_PACK (
GNUNET_JSON_pack_data_auto ("reserve_pub",
@@ -1681,13 +1628,6 @@ verify_reserve_balance (void *cls,
}
} /* end of 'if (internal_checks)' */
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Amount of total balance reserve not closed: %s\n",
- TALER_amount_to_string (&total_balance_reserve_not_closed));
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "nbalance: %s\n",
- TALER_amount_to_string (&nbalance));
-
/* Check that reserve is being closed if it is past its expiration date
(and the closing fee would not exceed the remaining balance) */
if (GNUNET_TIME_relative_cmp (CLOSING_GRACE_PERIOD,
@@ -1708,13 +1648,6 @@ verify_reserve_balance (void *cls,
if (1 == TALER_amount_cmp (&nbalance,
&cfee))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "2 Amount of total balance reserve not closed: %s\n",
- TALER_amount_to_string (&total_balance_reserve_not_closed));
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "1 nbalance: %s\n",
- TALER_amount_to_string (&nbalance));
-
/* remaining balance (according to us) exceeds closing fee */
TALER_ARL_amount_add (&total_balance_reserve_not_closed,
&total_balance_reserve_not_closed,
@@ -1744,13 +1677,6 @@ verify_reserve_balance (void *cls,
}
else
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "2 Amount of total balance reserve not closed: %s\n",
- TALER_amount_to_string (&total_balance_reserve_not_closed));
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "2 nbalance: %s\n",
- TALER_amount_to_string (&nbalance));
-
/* We failed to determine the closing fee, complain! */
// TODO: fix correctly and not just comment out
// nbalance get's set to invalid and there is never a check happening when working further with nbalance,
@@ -1763,11 +1689,9 @@ verify_reserve_balance (void *cls,
nbalance;
rncid.expiration_time = rs->a_expiration_date.abs_time;
rncid.diagnostic = "could not determine closing fee";
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, " 11 here\n");
qs = TALER_ARL_adb->insert_reserve_not_closed_inconsistency (
TALER_ARL_adb->cls,
&rncid);
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, " 12 here\n");
if (qs < 0)
{
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
@@ -1786,7 +1710,6 @@ verify_reserve_balance (void *cls,
"could not determine closing fee")));*/
}
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, " 1 here\n");
/* We already computed the 'new' balance in 'curr_balance'
to include the previous balance, so this one is just
an assignment, not adding up! */
@@ -1811,7 +1734,6 @@ verify_reserve_balance (void *cls,
TALER_ARL_amount_add (&rs->prev_balance.history_fee_balance,
&rs->prev_balance.history_fee_balance,
&rs->curr_balance.history_fee_balance);
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, " 2 here\n");
/* Update global balance: add incoming first, then try
to subtract outgoing... */
TALER_ARL_amount_add (&TALER_ARL_USE_AB (reserves_reserve_total_balance),
@@ -1847,7 +1769,6 @@ verify_reserve_balance (void *cls,
TALER_ARL_USE_AB (reserves_reserve_total_balance) = r;
}
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, " 3 here\n");
if (TALER_amount_is_zero (&rs->prev_balance.reserve_balance))
{
/* balance is zero, drop reserve details (and then do not update/insert) */
@@ -1897,7 +1818,6 @@ verify_reserve_balance (void *cls,
rc->qs = qs;
}
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, " 4 here\n");
/* now we can discard the cached entry */
GNUNET_assert (GNUNET_YES ==
GNUNET_CONTAINER_multihashmap_remove (rc->reserves,
@@ -1905,7 +1825,6 @@ verify_reserve_balance (void *cls,
rs));
GNUNET_free (rs->sender_account);
GNUNET_free (rs);
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, " 5 here\n");
return ret;
}
@@ -1995,8 +1914,6 @@ analyze_reserves (void *cls)
if (GNUNET_NO == TALER_amount_is_valid (&TALER_ARL_USE_AB (
reserves_reserve_total_balance)))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Found no balance, starting by 0.\n");
GNUNET_assert (GNUNET_OK ==
TALER_amount_set_zero (TALER_ARL_currency,
&TALER_ARL_USE_AB (
@@ -2082,9 +1999,6 @@ analyze_reserves (void *cls)
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
return qs;
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- " Size of rc.reserves %u \n",
- GNUNET_CONTAINER_multihashmap_size (rc.reserves));
GNUNET_CONTAINER_multihashmap_iterate (rc.reserves,
&verify_reserve_balance,
&rc);