diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-03-22 23:32:06 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-03-22 23:32:06 +0100 |
commit | 3480146a6658f16d8a12d9653cb2e8b358c595c8 (patch) | |
tree | 3c1816ac1ddc9a14a8c2a0c7bdfadce7c3d907ab /src/auditor/taler-helper-auditor-aggregation.c | |
parent | 488f759a2d7521a32b60ced7efb79681276d34f2 (diff) |
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.c | 56 |
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); |