diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-03-24 17:23:27 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-03-24 17:23:27 +0100 |
commit | 9ad9e7e064519fb65f14a530df690dd8a6973875 (patch) | |
tree | 343bf0921a7359cf7d2075ebcc06fe4225a72960 /src/auditor/taler-helper-auditor-coins.c | |
parent | 240b23684d3f2b05b903b37f0a5fe3fc9e07497d (diff) | |
download | exchange-9ad9e7e064519fb65f14a530df690dd8a6973875.tar.xz |
add more tests
Diffstat (limited to 'src/auditor/taler-helper-auditor-coins.c')
-rw-r--r-- | src/auditor/taler-helper-auditor-coins.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/auditor/taler-helper-auditor-coins.c b/src/auditor/taler-helper-auditor-coins.c index 5ce3e77ec..ea43b7206 100644 --- a/src/auditor/taler-helper-auditor-coins.c +++ b/src/auditor/taler-helper-auditor-coins.c @@ -283,9 +283,11 @@ report_emergency_by_count ( * @param exchange amount calculated by exchange * @param auditor amount calculated by auditor * @param profitable 1 if @a exchange being larger than @a auditor is - * profitable for the exchange for this operation, + * profitable for the exchange for this operation + * (and thus @a exchange being smaller than @ auditor + * representing a loss for the exchange); * -1 if @a exchange being smaller than @a auditor is - * profitable for the exchange, and 0 if it is unclear + * profitable for the exchange; and 0 if it is unclear */ static void report_amount_arithmetic_inconsistency ( @@ -1071,7 +1073,6 @@ refresh_session_cb (void *cls, TALER_amount_add (&total_bad_sig_loss, &total_bad_sig_loss, amount_with_fee)); - return GNUNET_OK; } } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, @@ -1181,14 +1182,12 @@ refresh_session_cb (void *cls, if (1 == TALER_amount_cmp (&refresh_cost, &amount_without_fee)) { - /* refresh_cost > amount_without_fee */ - report_amount_arithmetic_inconsistency ("melt (fee)", + /* refresh_cost > amount_without_fee, which is bad (exchange lost) */ + report_amount_arithmetic_inconsistency ("melt (cost)", rowid, - &amount_without_fee, - &refresh_cost, - -1); - GNUNET_free_non_null (reveal_ctx.new_issues); - return GNUNET_OK; + &amount_without_fee, /* 'exchange' */ + &refresh_cost, /* 'auditor' */ + 1); } /* update outstanding denomination amounts for fresh coins withdrawn */ |