summaryrefslogtreecommitdiff
path: root/src/auditor/taler-auditor-sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/auditor/taler-auditor-sync.c')
-rw-r--r--src/auditor/taler-auditor-sync.c45
1 files changed, 34 insertions, 11 deletions
diff --git a/src/auditor/taler-auditor-sync.c b/src/auditor/taler-auditor-sync.c
index 0dfaa19a1..e4022d325 100644
--- a/src/auditor/taler-auditor-sync.c
+++ b/src/auditor/taler-auditor-sync.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2020 Taler Systems SA
+ Copyright (C) 2020-2022 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
@@ -91,9 +91,14 @@ struct Table
static struct Table tables[] = {
{ .rt = TALER_EXCHANGEDB_RT_DENOMINATIONS},
{ .rt = TALER_EXCHANGEDB_RT_DENOMINATION_REVOCATIONS},
+ { .rt = TALER_EXCHANGEDB_RT_WIRE_TARGETS},
+ { .rt = TALER_EXCHANGEDB_RT_LEGITIMIZATION_PROCESSES},
+ { .rt = TALER_EXCHANGEDB_RT_LEGITIMIZATION_REQUIREMENTS},
{ .rt = TALER_EXCHANGEDB_RT_RESERVES},
{ .rt = TALER_EXCHANGEDB_RT_RESERVES_IN},
{ .rt = TALER_EXCHANGEDB_RT_RESERVES_CLOSE},
+ { .rt = TALER_EXCHANGEDB_RT_RESERVES_OPEN_REQUESTS},
+ { .rt = TALER_EXCHANGEDB_RT_RESERVES_OPEN_DEPOSITS},
{ .rt = TALER_EXCHANGEDB_RT_RESERVES_OUT},
{ .rt = TALER_EXCHANGEDB_RT_AUDITORS},
{ .rt = TALER_EXCHANGEDB_RT_AUDITOR_DENOM_SIGS},
@@ -103,13 +108,30 @@ static struct Table tables[] = {
{ .rt = TALER_EXCHANGEDB_RT_REFRESH_COMMITMENTS},
{ .rt = TALER_EXCHANGEDB_RT_REFRESH_REVEALED_COINS},
{ .rt = TALER_EXCHANGEDB_RT_REFRESH_TRANSFER_KEYS},
- { .rt = TALER_EXCHANGEDB_RT_DEPOSITS},
+ { .rt = TALER_EXCHANGEDB_RT_BATCH_DEPOSITS},
+ { .rt = TALER_EXCHANGEDB_RT_COIN_DEPOSITS},
{ .rt = TALER_EXCHANGEDB_RT_REFUNDS},
{ .rt = TALER_EXCHANGEDB_RT_WIRE_OUT},
{ .rt = TALER_EXCHANGEDB_RT_AGGREGATION_TRACKING},
{ .rt = TALER_EXCHANGEDB_RT_WIRE_FEE},
+ { .rt = TALER_EXCHANGEDB_RT_GLOBAL_FEE},
{ .rt = TALER_EXCHANGEDB_RT_RECOUP},
{ .rt = TALER_EXCHANGEDB_RT_RECOUP_REFRESH },
+ { .rt = TALER_EXCHANGEDB_RT_EXTENSIONS},
+ { .rt = TALER_EXCHANGEDB_RT_POLICY_DETAILS },
+ { .rt = TALER_EXCHANGEDB_RT_POLICY_FULFILLMENTS },
+ { .rt = TALER_EXCHANGEDB_RT_PURSE_REQUESTS},
+ { .rt = TALER_EXCHANGEDB_RT_PURSE_DECISION},
+ { .rt = TALER_EXCHANGEDB_RT_PURSE_MERGES},
+ { .rt = TALER_EXCHANGEDB_RT_PURSE_DEPOSITS},
+ { .rt = TALER_EXCHANGEDB_RT_ACCOUNT_MERGES},
+ { .rt = TALER_EXCHANGEDB_RT_HISTORY_REQUESTS},
+ { .rt = TALER_EXCHANGEDB_RT_CLOSE_REQUESTS},
+ { .rt = TALER_EXCHANGEDB_RT_WADS_OUT},
+ { .rt = TALER_EXCHANGEDB_RT_WADS_OUT_ENTRIES},
+ { .rt = TALER_EXCHANGEDB_RT_WADS_IN},
+ { .rt = TALER_EXCHANGEDB_RT_WADS_IN_ENTRIES},
+ { .rt = TALER_EXCHANGEDB_RT_PROFIT_DRAINS},
{ .end = true }
};
@@ -139,7 +161,7 @@ struct InsertContext
* @return #GNUNET_OK to continue to iterate,
* #GNUNET_SYSERR to fail with an error
*/
-static int
+static enum GNUNET_GenericReturnValue
do_insert (void *cls,
const struct TALER_EXCHANGEDB_TableData *td)
{
@@ -202,20 +224,16 @@ transact (void)
src->lookup_serial_by_table (src->cls,
tables[i].rt,
&tables[i].end_serial);
- if (0 >
- src->commit (src->cls))
- return GNUNET_SYSERR;
+ src->rollback (src->cls);
if (GNUNET_OK !=
- dst->start (src->cls,
+ dst->start (dst->cls,
"lookup dst serials"))
return GNUNET_SYSERR;
for (unsigned int i = 0; ! tables[i].end; i++)
dst->lookup_serial_by_table (dst->cls,
tables[i].rt,
&tables[i].start_serial);
- if (0 >
- dst->commit (dst->cls))
- return GNUNET_SYSERR;
+ dst->rollback (dst->cls);
for (unsigned int i = 0; ! tables[i].end; i++)
{
struct Table *table = &tables[i];
@@ -310,6 +328,7 @@ do_sync (void *cls)
{
static struct GNUNET_TIME_Relative delay;
+ (void) cls;
sync_task = NULL;
actual_size = 0;
if (GNUNET_SYSERR ==
@@ -375,7 +394,7 @@ do_sync (void *cls)
* @param value actual value of the option (a string)
* @return #GNUNET_OK
*/
-static int
+static enum GNUNET_GenericReturnValue
set_filename (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
void *scls,
const char *option,
@@ -469,6 +488,7 @@ load_config (const char *cfgfile)
static void
do_shutdown (void *cls)
{
+ (void) cls;
if (NULL != sync_task)
{
GNUNET_SCHEDULER_cancel (sync_task);
@@ -586,6 +606,9 @@ main (int argc,
level,
NULL));
GNUNET_free (level);
+ /* suppress compiler warnings... */
+ GNUNET_assert (NULL != src_cfgfile);
+ GNUNET_assert (NULL != dst_cfgfile);
if (0 == strcmp (src_cfgfile,
dst_cfgfile))
{