summaryrefslogtreecommitdiff
path: root/src/auditor/taler-helper-auditor-aggregation.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-03-22 23:32:06 +0100
committerChristian Grothoff <christian@grothoff.org>2020-03-22 23:32:06 +0100
commit3480146a6658f16d8a12d9653cb2e8b358c595c8 (patch)
tree3c1816ac1ddc9a14a8c2a0c7bdfadce7c3d907ab /src/auditor/taler-helper-auditor-aggregation.c
parent488f759a2d7521a32b60ced7efb79681276d34f2 (diff)
downloadexchange-3480146a6658f16d8a12d9653cb2e8b358c595c8.tar.gz
exchange-3480146a6658f16d8a12d9653cb2e8b358c595c8.tar.bz2
exchange-3480146a6658f16d8a12d9653cb2e8b358c595c8.zip
first pass at auditor-coins, also reviewing checks around amount arithmetic, can and should be made harsher
Diffstat (limited to 'src/auditor/taler-helper-auditor-aggregation.c')
-rw-r--r--src/auditor/taler-helper-auditor-aggregation.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/auditor/taler-helper-auditor-aggregation.c b/src/auditor/taler-helper-auditor-aggregation.c
index 74476a766..9982612e0 100644
--- a/src/auditor/taler-helper-auditor-aggregation.c
+++ b/src/auditor/taler-helper-auditor-aggregation.c
@@ -145,19 +145,19 @@ report_amount_arithmetic_inconsistency (
auditor))
{
/* exchange > auditor */
- GNUNET_break (GNUNET_OK ==
- TALER_amount_subtract (&delta,
- exchange,
- auditor));
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_subtract (&delta,
+ exchange,
+ auditor));
}
else
{
/* auditor < exchange */
profitable = -profitable;
- GNUNET_break (GNUNET_OK ==
- TALER_amount_subtract (&delta,
- auditor,
- exchange));
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_subtract (&delta,
+ auditor,
+ exchange));
}
TALER_ARL_report (report_amount_arithmetic_inconsistencies,
json_pack ("{s:s, s:I, s:o, s:o, s:I}",
@@ -171,10 +171,10 @@ report_amount_arithmetic_inconsistency (
target = (1 == profitable)
? &total_arithmetic_delta_plus
: &total_arithmetic_delta_minus;
- GNUNET_break (GNUNET_OK ==
- TALER_amount_add (target,
- target,
- &delta));
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_add (target,
+ target,
+ &delta));
}
}
@@ -207,19 +207,19 @@ report_coin_arithmetic_inconsistency (
auditor))
{
/* exchange > auditor */
- GNUNET_break (GNUNET_OK ==
- TALER_amount_subtract (&delta,
- exchange,
- auditor));
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_subtract (&delta,
+ exchange,
+ auditor));
}
else
{
/* auditor < exchange */
profitable = -profitable;
- GNUNET_break (GNUNET_OK ==
- TALER_amount_subtract (&delta,
- auditor,
- exchange));
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_subtract (&delta,
+ auditor,
+ exchange));
}
TALER_ARL_report (report_coin_inconsistencies,
json_pack ("{s:s, s:o, s:o, s:o, s:I}",
@@ -234,10 +234,10 @@ report_coin_arithmetic_inconsistency (
target = (1 == profitable)
? &total_coin_delta_plus
: &total_coin_delta_minus;
- GNUNET_break (GNUNET_OK ==
- TALER_amount_add (target,
- target,
- &delta));
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_add (target,
+ target,
+ &delta));
}
}
@@ -856,10 +856,10 @@ wire_transfer_information_cb (
"loss", TALER_JSON_from_amount (coin_value),
"key_pub", GNUNET_JSON_from_data_auto (
&issue->denom_hash)));
- GNUNET_break (GNUNET_OK ==
- TALER_amount_add (&total_bad_sig_loss,
- &total_bad_sig_loss,
- coin_value));
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_add (&total_bad_sig_loss,
+ &total_bad_sig_loss,
+ coin_value));
GNUNET_CRYPTO_rsa_signature_free (coin.denom_sig.rsa_signature);
TALER_ARL_edb->free_coin_transaction_list (TALER_ARL_edb->cls,
tl);