summaryrefslogtreecommitdiff
path: root/src/exchange-tools/taler-exchange-dbinit.c
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2024-03-08 11:12:50 +0100
committerChristian Grothoff <grothoff@gnunet.org>2024-03-08 11:12:50 +0100
commita50e69908e7205021167415fac42162be96f98d0 (patch)
tree3de2eb42d6c5243e860dc02fe8846fadb3d1dd5a /src/exchange-tools/taler-exchange-dbinit.c
parentfb02619f98eca93de71aaee9c7c8d83ac77025bc (diff)
downloadexchange-a50e69908e7205021167415fac42162be96f98d0.tar.gz
exchange-a50e69908e7205021167415fac42162be96f98d0.tar.bz2
exchange-a50e69908e7205021167415fac42162be96f98d0.zip
add taler-exchange-dbinit -a option
Diffstat (limited to 'src/exchange-tools/taler-exchange-dbinit.c')
-rw-r--r--src/exchange-tools/taler-exchange-dbinit.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/exchange-tools/taler-exchange-dbinit.c b/src/exchange-tools/taler-exchange-dbinit.c
index d2cd22c1e..41ff2ab24 100644
--- a/src/exchange-tools/taler-exchange-dbinit.c
+++ b/src/exchange-tools/taler-exchange-dbinit.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2014-2022 Taler Systems SA
+ Copyright (C) 2014-2024 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
@@ -30,6 +30,11 @@
static int global_ret;
/**
+ * -a option: inject auditor triggers
+ */
+static int inject_auditor;
+
+/**
* -r option: do full DB reset
*/
static int reset_db;
@@ -133,6 +138,15 @@ run (void *cls,
}
}
}
+ if (inject_auditor)
+ {
+ if (GNUNET_SYSERR == plugin->inject_auditor_triggers (plugin->cls))
+ {
+ fprintf (stderr,
+ "Injecting auditor triggers failed!\n");
+ global_ret = EXIT_FAILURE;
+ }
+ }
TALER_EXCHANGEDB_plugin_unload (plugin);
plugin = NULL;
}
@@ -151,6 +165,10 @@ main (int argc,
char *const *argv)
{
const struct GNUNET_GETOPT_CommandLineOption options[] = {
+ GNUNET_GETOPT_option_flag ('a',
+ "inject-auditor",
+ "inject auditor triggers",
+ &inject_auditor),
GNUNET_GETOPT_option_flag ('g',
"gc",
"garbage collect database",