From 40551fa08e45fcc71f3d260478a2f9910920f27d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 6 Jan 2021 22:51:55 +0100 Subject: add -i option to taler-auditor --- src/auditor/taler-helper-auditor-aggregation.c | 9 +++++++++ src/auditor/taler-helper-auditor-coins.c | 9 +++++++++ src/auditor/taler-helper-auditor-deposits.c | 8 ++++++++ src/auditor/taler-helper-auditor-reserves.c | 8 ++++++++ src/auditor/taler-helper-auditor-wire.c | 8 ++++++++ 5 files changed, 42 insertions(+) (limited to 'src/auditor') diff --git a/src/auditor/taler-helper-auditor-aggregation.c b/src/auditor/taler-helper-auditor-aggregation.c index f3f65ffb3..5a144ddf9 100644 --- a/src/auditor/taler-helper-auditor-aggregation.c +++ b/src/auditor/taler-helper-auditor-aggregation.c @@ -116,6 +116,11 @@ static json_t *report_bad_sig_losses; */ static struct TALER_Amount total_bad_sig_loss; +/** + * Should we run checks that only work for exchange-internal audits? + */ +static int internal_checks; + /** * Report a (serious) inconsistency in the exchange's database with @@ -1462,6 +1467,10 @@ main (int argc, char *const *argv) { const struct GNUNET_GETOPT_CommandLineOption options[] = { + GNUNET_GETOPT_option_flag ('i', + "internal", + "perform checks only applicable for exchange-internal audits", + &internal_checks), GNUNET_GETOPT_option_base32_auto ('m', "exchange-key", "KEY", diff --git a/src/auditor/taler-helper-auditor-coins.c b/src/auditor/taler-helper-auditor-coins.c index a63426f7a..bceb04198 100644 --- a/src/auditor/taler-helper-auditor-coins.c +++ b/src/auditor/taler-helper-auditor-coins.c @@ -193,6 +193,11 @@ struct CoinHistory */ static struct CoinHistory coin_histories[MAX_COIN_HISTORIES]; +/** + * Should we run checks that only work for exchange-internal audits? + */ +static int internal_checks; + /** * Return the index we should use for @a coin_pub in #coin_histories. @@ -2742,6 +2747,10 @@ main (int argc, char *const *argv) { const struct GNUNET_GETOPT_CommandLineOption options[] = { + GNUNET_GETOPT_option_flag ('i', + "internal", + "perform checks only applicable for exchange-internal audits", + &internal_checks), GNUNET_GETOPT_option_base32_auto ('m', "exchange-key", "KEY", diff --git a/src/auditor/taler-helper-auditor-deposits.c b/src/auditor/taler-helper-auditor-deposits.c index b9c4ff8de..1c0128319 100644 --- a/src/auditor/taler-helper-auditor-deposits.c +++ b/src/auditor/taler-helper-auditor-deposits.c @@ -51,6 +51,10 @@ static json_int_t number_missed_deposit_confirmations; */ static struct TALER_Amount total_missed_deposit_confirmations; +/** + * Should we run checks that only work for exchange-internal audits? + */ +static int internal_checks; /** * Closure for #test_dc. @@ -343,6 +347,10 @@ main (int argc, char *const *argv) { const struct GNUNET_GETOPT_CommandLineOption options[] = { + GNUNET_GETOPT_option_flag ('i', + "internal", + "perform checks only applicable for exchange-internal audits", + &internal_checks), GNUNET_GETOPT_option_base32_auto ('m', "exchange-key", "KEY", diff --git a/src/auditor/taler-helper-auditor-reserves.c b/src/auditor/taler-helper-auditor-reserves.c index 8f7921fa8..8b49f747c 100644 --- a/src/auditor/taler-helper-auditor-reserves.c +++ b/src/auditor/taler-helper-auditor-reserves.c @@ -142,6 +142,10 @@ static json_t *report_bad_sig_losses; */ static struct TALER_Amount total_bad_sig_loss; +/** + * Should we run checks that only work for exchange-internal audits? + */ +static int internal_checks; /* ***************************** Report logic **************************** */ @@ -1660,6 +1664,10 @@ main (int argc, char *const *argv) { const struct GNUNET_GETOPT_CommandLineOption options[] = { + GNUNET_GETOPT_option_flag ('i', + "internal", + "perform checks only applicable for exchange-internal audits", + &internal_checks), GNUNET_GETOPT_option_base32_auto ('m', "exchange-key", "KEY", diff --git a/src/auditor/taler-helper-auditor-wire.c b/src/auditor/taler-helper-auditor-wire.c index 1facd2155..128eba812 100644 --- a/src/auditor/taler-helper-auditor-wire.c +++ b/src/auditor/taler-helper-auditor-wire.c @@ -314,6 +314,10 @@ static struct GNUNET_CURL_Context *ctx; */ static struct GNUNET_CURL_RescheduleContext *rc; +/** + * Should we run checks that only work for exchange-internal audits? + */ +static int internal_checks; /* ***************************** Shutdown **************************** */ @@ -2166,6 +2170,10 @@ main (int argc, char *const *argv) { const struct GNUNET_GETOPT_CommandLineOption options[] = { + GNUNET_GETOPT_option_flag ('i', + "internal", + "perform checks only applicable for exchange-internal audits", + &internal_checks), GNUNET_GETOPT_option_base32_auto ('m', "exchange-key", "KEY", -- cgit v1.2.3