aboutsummaryrefslogtreecommitdiff
path: root/src/auditor/taler-helper-auditor-reserves.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-reserves.c
parent488f759a2d7521a32b60ced7efb79681276d34f2 (diff)
downloadexchange-3480146a6658f16d8a12d9653cb2e8b358c595c8.tar.xz
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-reserves.c')
-rw-r--r--src/auditor/taler-helper-auditor-reserves.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/auditor/taler-helper-auditor-reserves.c b/src/auditor/taler-helper-auditor-reserves.c
index ccc6df55e..79439e01f 100644
--- a/src/auditor/taler-helper-auditor-reserves.c
+++ b/src/auditor/taler-helper-auditor-reserves.c
@@ -174,19 +174,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}",
@@ -200,10 +200,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));
}
}
@@ -725,10 +725,10 @@ handle_recoup_by_reserve (
report_row_inconsistency ("recoup",
rowid,
"denomination key not in revocation set");
- GNUNET_break (GNUNET_OK ==
- TALER_amount_add (&total_irregular_recoups,
- &total_irregular_recoups,
- amount));
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_add (&total_irregular_recoups,
+ &total_irregular_recoups,
+ amount));
}
else
{
@@ -774,10 +774,10 @@ handle_recoup_by_reserve (
"loss", TALER_JSON_from_amount (amount),
"key_pub", GNUNET_JSON_from_data_auto (
&TALER_ARL_master_pub)));
- GNUNET_break (GNUNET_OK ==
- TALER_amount_add (&total_bad_sig_loss,
- &total_bad_sig_loss,
- amount));
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_add (&total_bad_sig_loss,
+ &total_bad_sig_loss,
+ amount));
}
GNUNET_CRYPTO_hash (reserve_pub,