From eac8b8c0da9f82d67ba379e2b9211c96be214436 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 17 Mar 2022 15:06:58 +0100 Subject: -re-enable test-revocation.sh, works again --- src/auditor/taler-helper-auditor-coins.c | 69 +++++++++++++++++++++----------- 1 file changed, 46 insertions(+), 23 deletions(-) (limited to 'src/auditor/taler-helper-auditor-coins.c') diff --git a/src/auditor/taler-helper-auditor-coins.c b/src/auditor/taler-helper-auditor-coins.c index 525b3569f..775f2b598 100644 --- a/src/auditor/taler-helper-auditor-coins.c +++ b/src/auditor/taler-helper-auditor-coins.c @@ -1959,29 +1959,6 @@ check_recoup (struct CoinContext *cc, cc->qs = qs; return GNUNET_SYSERR; } - if (GNUNET_OK != - TALER_wallet_recoup_verify (&coin->denom_pub_hash, - coin_blind, - &coin->coin_pub, - coin_sig)) - { - TALER_ARL_report (report_bad_sig_losses, - GNUNET_JSON_PACK ( - GNUNET_JSON_pack_string ("operation", - operation), - GNUNET_JSON_pack_uint64 ("row", - rowid), - TALER_JSON_pack_amount ("loss", - amount), - GNUNET_JSON_pack_data_auto ("coin_pub", - &coin->coin_pub))); - TALER_ARL_amount_add (&total_bad_sig_loss, - &total_bad_sig_loss, - amount); - if (TALER_ARL_do_abort ()) - return GNUNET_SYSERR; - return GNUNET_OK; - } ds = get_denomination_summary (cc, issue, &issue->denom_hash); @@ -2056,6 +2033,29 @@ recoup_cb (void *cls, ppc.last_recoup_serial_id = rowid + 1; (void) timestamp; (void) reserve_pub; + if (GNUNET_OK != + TALER_wallet_recoup_verify (&coin->denom_pub_hash, + coin_blind, + &coin->coin_pub, + coin_sig)) + { + TALER_ARL_report (report_bad_sig_losses, + GNUNET_JSON_PACK ( + GNUNET_JSON_pack_string ("operation", + "recoup"), + GNUNET_JSON_pack_uint64 ("row", + rowid), + TALER_JSON_pack_amount ("loss", + amount), + GNUNET_JSON_pack_data_auto ("coin_pub", + &coin->coin_pub))); + TALER_ARL_amount_add (&total_bad_sig_loss, + &total_bad_sig_loss, + amount); + if (TALER_ARL_do_abort ()) + return GNUNET_SYSERR; + return GNUNET_OK; + } return check_recoup (cc, "recoup", rowid, @@ -2147,6 +2147,29 @@ recoup_refresh_cb (void *cls, } } + if (GNUNET_OK != + TALER_wallet_recoup_refresh_verify (&coin->denom_pub_hash, + coin_blind, + &coin->coin_pub, + coin_sig)) + { + TALER_ARL_report (report_bad_sig_losses, + GNUNET_JSON_PACK ( + GNUNET_JSON_pack_string ("operation", + "recoup-refresh"), + GNUNET_JSON_pack_uint64 ("row", + rowid), + TALER_JSON_pack_amount ("loss", + amount), + GNUNET_JSON_pack_data_auto ("coin_pub", + &coin->coin_pub))); + TALER_ARL_amount_add (&total_bad_sig_loss, + &total_bad_sig_loss, + amount); + if (TALER_ARL_do_abort ()) + return GNUNET_SYSERR; + return GNUNET_OK; + } return check_recoup (cc, "recoup-refresh", rowid, -- cgit v1.2.3