aboutsummaryrefslogtreecommitdiff
path: root/src/auditordb
diff options
context:
space:
mode:
Diffstat (limited to 'src/auditordb')
-rw-r--r--src/auditordb/auditordb_plugin.c1
-rw-r--r--src/auditordb/plugin_auditordb_postgres.c20
-rw-r--r--src/auditordb/test_auditordb.c2
3 files changed, 9 insertions, 14 deletions
diff --git a/src/auditordb/auditordb_plugin.c b/src/auditordb/auditordb_plugin.c
index 51ae77c16..ffd96b495 100644
--- a/src/auditordb/auditordb_plugin.c
+++ b/src/auditordb/auditordb_plugin.c
@@ -84,5 +84,4 @@ TALER_AUDITORDB_plugin_unload (struct TALER_AUDITORDB_Plugin *plugin)
}
-
/* end of auditordb_plugin.c */
diff --git a/src/auditordb/plugin_auditordb_postgres.c b/src/auditordb/plugin_auditordb_postgres.c
index e5445f2ad..c5559131f 100644
--- a/src/auditordb/plugin_auditordb_postgres.c
+++ b/src/auditordb/plugin_auditordb_postgres.c
@@ -206,8 +206,7 @@ postgres_create_tables (void *cls)
serial ID from the respective tables that we have
processed. Thus, we need to select those table entries that are
strictly larger (and process in monotonically increasing
- order). */
- GNUNET_PQ_make_execute (
+ order). */GNUNET_PQ_make_execute (
"CREATE TABLE IF NOT EXISTS auditor_progress_reserve"
"(master_pub BYTEA CONSTRAINT master_pub_ref REFERENCES auditor_exchanges(master_pub) ON DELETE CASCADE"
",last_reserve_in_serial_id INT8 NOT NULL DEFAULT 0"
@@ -253,8 +252,7 @@ postgres_create_tables (void *cls)
"last_reserve_out_serial_id" marks the last withdrawal from
"reserves_out" about this reserve that the auditor is aware of,
and "last_reserve_in_serial_id" is the last "reserve_in"
- operation about this reserve that the auditor is aware of. */
- GNUNET_PQ_make_execute ("CREATE TABLE IF NOT EXISTS auditor_reserves"
+ operation about this reserve that the auditor is aware of. */GNUNET_PQ_make_execute ("CREATE TABLE IF NOT EXISTS auditor_reserves"
"(reserve_pub BYTEA NOT NULL CHECK(LENGTH(reserve_pub)=32)"
",master_pub BYTEA CONSTRAINT master_pub_ref REFERENCES auditor_exchanges(master_pub) ON DELETE CASCADE"
",reserve_balance_val INT8 NOT NULL"
@@ -289,8 +287,7 @@ postgres_create_tables (void *cls)
(outstanding as well as issued overall which implies the
maximum value at risk). We also count the number of coins
issued (withdraw, refresh-reveal) and the number of coins seen
- at the exchange (refresh-commit, deposit), not just the amounts. */
- GNUNET_PQ_make_execute (
+ at the exchange (refresh-commit, deposit), not just the amounts. */GNUNET_PQ_make_execute (
"CREATE TABLE IF NOT EXISTS auditor_denomination_pending"
"(denom_pub_hash BYTEA PRIMARY KEY"
" REFERENCES auditor_denominations (denom_pub_hash) ON DELETE CASCADE"
@@ -309,8 +306,7 @@ postgres_create_tables (void *cls)
respective's exchange's master public key); it represents the
auditor_balance_summary of the exchange at this point (modulo
unexpected historic_loss-style events where denomination keys are
- compromised) */
- GNUNET_PQ_make_execute ("CREATE TABLE IF NOT EXISTS auditor_balance_summary"
+ compromised) */GNUNET_PQ_make_execute ("CREATE TABLE IF NOT EXISTS auditor_balance_summary"
"(master_pub BYTEA CONSTRAINT master_pub_ref REFERENCES auditor_exchanges(master_pub) ON DELETE CASCADE"
",denom_balance_val INT8 NOT NULL"
",denom_balance_frac INT4 NOT NULL"
@@ -333,8 +329,7 @@ postgres_create_tables (void *cls)
coin except for withdraw fees (which are in
historic_reserve_revenue); the deposit, melt and refund fees are given
individually; the delta to the revenue_balance is from coins that
- were withdrawn but never deposited prior to expiration. */
- GNUNET_PQ_make_execute (
+ were withdrawn but never deposited prior to expiration. */GNUNET_PQ_make_execute (
"CREATE TABLE IF NOT EXISTS auditor_historic_denomination_revenue"
"(master_pub BYTEA CONSTRAINT master_pub_ref REFERENCES auditor_exchanges(master_pub) ON DELETE CASCADE"
",denom_pub_hash BYTEA PRIMARY KEY CHECK (LENGTH(denom_pub_hash)=64)"
@@ -389,8 +384,7 @@ postgres_create_tables (void *cls)
the tables overall, we'll need a command-line tool to insert rows
into this table and update "auditor_predicted_result" accordingly.
(So this table for now just exists as a reminder of what we'll
- need in the long term.) */
- GNUNET_PQ_make_execute ("CREATE TABLE IF NOT EXISTS auditor_historic_ledger"
+ need in the long term.) */GNUNET_PQ_make_execute ("CREATE TABLE IF NOT EXISTS auditor_historic_ledger"
"(master_pub BYTEA CONSTRAINT master_pub_ref REFERENCES auditor_exchanges(master_pub) ON DELETE CASCADE"
",purpose VARCHAR NOT NULL"
",timestamp INT8 NOT NULL"
@@ -1502,7 +1496,6 @@ postgres_get_deposit_confirmations (void *cls,
}
-
/**
* Insert information about a denomination key and in particular
* the properties (value, fees, expiration times) the coins signed
@@ -3586,4 +3579,5 @@ libtaler_plugin_auditordb_postgres_done (void *cls)
return NULL;
}
+
/* end of plugin_auditordb_postgres.c */
diff --git a/src/auditordb/test_auditordb.c b/src/auditordb/test_auditordb.c
index 3968f0218..9b97d47bd 100644
--- a/src/auditordb/test_auditordb.c
+++ b/src/auditordb/test_auditordb.c
@@ -581,6 +581,7 @@ run (void *cls)
return GNUNET_OK;
}
+
FAILIF (0 >=
plugin->select_historic_denom_revenue (plugin->cls,
session,
@@ -644,6 +645,7 @@ run (void *cls)
return GNUNET_OK;
}
+
FAILIF (0 >=
plugin->select_historic_reserve_revenue (plugin->cls,
session,