diff options
Diffstat (limited to 'src/exchange-tools')
-rw-r--r-- | src/exchange-tools/taler-exchange-dbinit.c | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/src/exchange-tools/taler-exchange-dbinit.c b/src/exchange-tools/taler-exchange-dbinit.c index 28850c016..8746d3e58 100644 --- a/src/exchange-tools/taler-exchange-dbinit.c +++ b/src/exchange-tools/taler-exchange-dbinit.c @@ -65,11 +65,6 @@ static int force_create_partitions; static uint32_t shard_idx; /** - * -R option: do full shard DB reset - */ -static uint32_t reset_shard_db; - -/** * Main function that will be run. * * @param cls closure @@ -98,31 +93,18 @@ run (void *cls, } if (reset_db) { - if (GNUNET_OK != plugin->drop_tables (plugin->cls)) + if (GNUNET_OK != + plugin->drop_tables (plugin->cls)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Could not drop tables as requested. Either database was not yet initialized, or permission denied. Consult the logs. Will still try to create new tables.\n"); } } - if (0 < - reset_shard_db) - { - if (GNUNET_OK != plugin->drop_shard_tables (plugin->cls, reset_shard_db)) - { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Could not drop shard tables as requested. Either database was not yet initialized or permission denied. Consult the logs.\n"); - global_ret = EXIT_FAILURE; - return; - } - GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, - "Dropped shard database, please call taler-exchange-dbinit -S <N> to initialize a new shard database\n"); - return; - } - if (0 < - shard_idx) + if (0 < shard_idx) { - if (GNUNET_OK != plugin->create_shard_tables (plugin->cls, - shard_idx)) + if (GNUNET_OK != + plugin->create_shard_tables (plugin->cls, + shard_idx)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Could not create shard database\n"); @@ -249,11 +231,6 @@ main (int argc, "INDEX", "Setup a shard server, creates tables with INDEX as suffix", &shard_idx), - GNUNET_GETOPT_option_uint ('R', - "reset-shard", - "OLD_SHARD_IDX", - "reset a shard database, does not reinitialize i.e. call taler-exchange-dbinit -S afterwards (DANGEROUS: all existing data is lost!)", - &reset_shard_db), GNUNET_GETOPT_option_flag ('f', "force", "Force partitions to be created if there is only one partition", |