diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-07-23 13:02:04 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-07-23 13:02:04 +0200 |
commit | 306a08a71c0f1e8e3e549fbb72c0eecdb3ec9a70 (patch) | |
tree | cb870eb6b35b952eb2b015a7ef63010b73552d2d /src/auditor | |
parent | 23e084718897f948d9256b898fc3a2a6ff582341 (diff) | |
download | exchange-306a08a71c0f1e8e3e549fbb72c0eecdb3ec9a70.tar.gz exchange-306a08a71c0f1e8e3e549fbb72c0eecdb3ec9a70.tar.bz2 exchange-306a08a71c0f1e8e3e549fbb72c0eecdb3ec9a70.zip |
-rename TALER_amount_get_zero to TALER_amount_set_zero
Diffstat (limited to 'src/auditor')
-rw-r--r-- | src/auditor/taler-helper-auditor-aggregation.c | 28 | ||||
-rw-r--r-- | src/auditor/taler-helper-auditor-coins.c | 48 | ||||
-rw-r--r-- | src/auditor/taler-helper-auditor-deposits.c | 2 | ||||
-rw-r--r-- | src/auditor/taler-helper-auditor-reserves.c | 42 | ||||
-rw-r--r-- | src/auditor/taler-helper-auditor-wire.c | 18 |
5 files changed, 69 insertions, 69 deletions
diff --git a/src/auditor/taler-helper-auditor-aggregation.c b/src/auditor/taler-helper-auditor-aggregation.c index 27c67ea5b..cdcbd37d1 100644 --- a/src/auditor/taler-helper-auditor-aggregation.c +++ b/src/auditor/taler-helper-auditor-aggregation.c @@ -399,16 +399,16 @@ check_transaction_history_for_deposit ( "Checking transaction history of coin %s\n", TALER_B2S (coin_pub)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &expenditures)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &refunds)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, merchant_gain)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &merchant_loss)); /* Go over transaction history to compute totals; note that we do not bother to reconstruct the order of the events, so instead of subtracting we @@ -625,7 +625,7 @@ check_transaction_history_for_deposit ( as a NEGATIVE contribution as that is not allowed; so let's count it as zero as that's the best we can do. */ GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, merchant_gain)); } else @@ -1055,7 +1055,7 @@ check_wire_out_cb (void *cls, wcc.qs = GNUNET_DB_STATUS_SUCCESS_ONE_RESULT; wcc.date = date; GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (amount->currency, + TALER_amount_set_zero (amount->currency, &wcc.total_deposits)); if (GNUNET_OK != TALER_JSON_merchant_wire_signature_hash (wire, @@ -1339,28 +1339,28 @@ run (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting audit\n"); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_aggregation_fee_income)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_wire_out_delta_plus)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_wire_out_delta_minus)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_arithmetic_delta_plus)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_arithmetic_delta_minus)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_coin_delta_plus)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_coin_delta_minus)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_bad_sig_loss)); GNUNET_assert (NULL != (report_row_inconsistencies diff --git a/src/auditor/taler-helper-auditor-coins.c b/src/auditor/taler-helper-auditor-coins.c index 7b91e77b4..58c06bed0 100644 --- a/src/auditor/taler-helper-auditor-coins.c +++ b/src/auditor/taler-helper-auditor-coins.c @@ -480,13 +480,13 @@ check_coin_history (const struct TALER_CoinSpendPublicKeyP *coin_pub, return qs; GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (value->currency, + TALER_amount_set_zero (value->currency, &refunded)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (value->currency, + TALER_amount_set_zero (value->currency, &spent)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (value->currency, + TALER_amount_set_zero (value->currency, &deposit_fee)); have_refund = GNUNET_NO; for (struct TALER_EXCHANGEDB_TransactionList *pos = tl; @@ -695,16 +695,16 @@ init_denomination (const struct GNUNET_HashCode *denom_hash, else { GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &ds->denom_balance)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &ds->denom_loss)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &ds->denom_risk)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &ds->denom_recoup)); } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, @@ -1374,7 +1374,7 @@ refresh_session_cb (void *cls, /* Check that the resulting amounts are consistent with the value being refreshed by calculating the total refresh cost */ GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (amount_with_fee->currency, + TALER_amount_set_zero (amount_with_fee->currency, &refresh_cost)); for (unsigned int i = 0; i<reveal_ctx.num_freshcoins; i++) { @@ -1415,7 +1415,7 @@ refresh_session_cb (void *cls, /* To continue, best assumption is the melted coin contributed nothing (=> all withdrawal amounts will be counted as losses) */ GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &amount_without_fee)); } } @@ -2549,49 +2549,49 @@ run (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting audit\n"); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &reported_emergency_loss)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &reported_emergency_risk_by_amount)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &reported_emergency_risk_by_count)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &reported_emergency_loss_by_count)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_escrow_balance)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_risk)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_recoup_loss)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_irregular_recoups)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_deposit_fee_income)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_melt_fee_income)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_refund_fee_income)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_arithmetic_delta_plus)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_arithmetic_delta_minus)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_bad_sig_loss)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_refresh_hanging)); GNUNET_assert (NULL != (report_emergencies = json_array ())); diff --git a/src/auditor/taler-helper-auditor-deposits.c b/src/auditor/taler-helper-auditor-deposits.c index 6bf94589a..a0a86540f 100644 --- a/src/auditor/taler-helper-auditor-deposits.c +++ b/src/auditor/taler-helper-auditor-deposits.c @@ -212,7 +212,7 @@ analyze_deposit_confirmations (void *cls) /* setup 'cc' */ GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &dcc.missed_amount)); dcc.qs = GNUNET_DB_STATUS_SUCCESS_ONE_RESULT; dcc.missed_count = 0LLU; diff --git a/src/auditor/taler-helper-auditor-reserves.c b/src/auditor/taler-helper-auditor-reserves.c index 87b555e05..41580e0c7 100644 --- a/src/auditor/taler-helper-auditor-reserves.c +++ b/src/auditor/taler-helper-auditor-reserves.c @@ -326,10 +326,10 @@ load_auditor_reserve_summary (struct ReserveSummary *rs) { rs->had_ri = GNUNET_NO; GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (rs->total_in.currency, + TALER_amount_set_zero (rs->total_in.currency, &rs->balance_at_previous_audit)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (rs->total_in.currency, + TALER_amount_set_zero (rs->total_in.currency, &rs->a_withdraw_fee_balance)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Creating fresh reserve `%s' with starting balance %s\n", @@ -426,10 +426,10 @@ handle_reserve_in (void *cls, rs->reserve_pub = *reserve_pub; rs->total_in = *credit; GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (credit->currency, + TALER_amount_set_zero (credit->currency, &rs->total_out)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (credit->currency, + TALER_amount_set_zero (credit->currency, &rs->total_fee)); if (0 > (qs = load_auditor_reserve_summary (rs))) { @@ -612,10 +612,10 @@ handle_reserve_out (void *cls, rs->reserve_pub = *reserve_pub; rs->total_out = auditor_amount_with_fee; GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (amount_with_fee->currency, + TALER_amount_set_zero (amount_with_fee->currency, &rs->total_in)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (amount_with_fee->currency, + TALER_amount_set_zero (amount_with_fee->currency, &rs->total_fee)); qs = load_auditor_reserve_summary (rs); if (0 > qs) @@ -800,10 +800,10 @@ handle_recoup_by_reserve ( rs->reserve_pub = *reserve_pub; rs->total_in = *amount; GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (amount->currency, + TALER_amount_set_zero (amount->currency, &rs->total_out)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (amount->currency, + TALER_amount_set_zero (amount->currency, &rs->total_fee)); qs = load_auditor_reserve_summary (rs); if (0 > qs) @@ -939,7 +939,7 @@ handle_reserve_closed ( rs->total_out = *amount_with_fee; rs->total_fee = *closing_fee; GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (amount_with_fee->currency, + TALER_amount_set_zero (amount_with_fee->currency, &rs->total_in)); qs = load_auditor_reserve_summary (rs); if (0 > qs) @@ -1058,7 +1058,7 @@ verify_reserve_balance (void *cls, TALER_JSON_from_amount (&loss))); /* Continue with a reserve balance of zero */ GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (balance.currency, + TALER_amount_set_zero (balance.currency, &nbalance)); } @@ -1226,7 +1226,7 @@ verify_reserve_balance (void *cls, /* We unexpectedly went negative, so a sane value to continue from would be zero. */ GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_escrow_balance)); } else @@ -1507,34 +1507,34 @@ run (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting audit\n"); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_escrow_balance)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_irregular_recoups)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_withdraw_fee_income)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_balance_insufficient_loss)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_balance_summary_delta_plus)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_balance_summary_delta_minus)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_arithmetic_delta_plus)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_arithmetic_delta_minus)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_balance_reserve_not_closed)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_bad_sig_loss)); GNUNET_assert (NULL != (report_row_inconsistencies = json_array ())); diff --git a/src/auditor/taler-helper-auditor-wire.c b/src/auditor/taler-helper-auditor-wire.c index 5e870813d..f98975c69 100644 --- a/src/auditor/taler-helper-auditor-wire.c +++ b/src/auditor/taler-helper-auditor-wire.c @@ -2143,31 +2143,31 @@ run (void *cls, GNUNET_assert (NULL != (report_account_progress = json_array ())); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_bad_amount_out_plus)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_bad_amount_out_minus)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_bad_amount_in_plus)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_bad_amount_in_minus)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_missattribution_in)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_amount_lag)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_closure_amount_lag)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &total_wire_format_amount)); GNUNET_assert (GNUNET_OK == - TALER_amount_get_zero (TALER_ARL_currency, + TALER_amount_set_zero (TALER_ARL_currency, &zero)); TALER_EXCHANGEDB_find_accounts (TALER_ARL_cfg, &process_account_cb, |