summaryrefslogtreecommitdiff
path: root/src/auditordb/plugin_auditordb_postgres.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-10-12 20:46:42 +0200
committerChristian Grothoff <christian@grothoff.org>2017-10-12 20:46:42 +0200
commitcb13afaf54852a531362d08420a1c062f5f32efe (patch)
treebff636f3a917fd8d9451e4d4a012051df58a065d /src/auditordb/plugin_auditordb_postgres.c
parent600d1684e31a19219a44d751ce28469984dfe25b (diff)
downloadexchange-cb13afaf54852a531362d08420a1c062f5f32efe.tar.gz
exchange-cb13afaf54852a531362d08420a1c062f5f32efe.tar.bz2
exchange-cb13afaf54852a531362d08420a1c062f5f32efe.zip
complete first pass of taler-wre-auditor's wire-out audit logic
Diffstat (limited to 'src/auditordb/plugin_auditordb_postgres.c')
-rw-r--r--src/auditordb/plugin_auditordb_postgres.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/auditordb/plugin_auditordb_postgres.c b/src/auditordb/plugin_auditordb_postgres.c
index b9da0321..7c6db86d 100644
--- a/src/auditordb/plugin_auditordb_postgres.c
+++ b/src/auditordb/plugin_auditordb_postgres.c
@@ -231,7 +231,7 @@ postgres_create_tables (void *cls)
GNUNET_PQ_make_execute ("CREATE TABLE IF NOT EXISTS wire_auditor_progress"
"(master_pub BYTEA PRIMARY KEY CHECK (LENGTH(master_pub)=32)"
",last_wire_reserve_in_serial_id INT8 NOT NULL DEFAULT 0"
- ",last_wire_reserve_out_serial_id INT8 NOT NULL DEFAULT 0"
+ ",last_wire_wire_out_serial_id INT8 NOT NULL DEFAULT 0"
",wire_in_off BYTEA"
",wire_out_off BYTEA"
")"),
@@ -520,7 +520,7 @@ postgres_prepare (PGconn *db_conn)
"INSERT INTO wire_auditor_progress "
"(master_pub"
",last_wire_reserve_in_serial_id"
- ",last_wire_reserve_out_serial_id"
+ ",last_wire_wire_out_serial_id"
",wire_in_off"
",wire_out_off"
") VALUES ($1,$2,$3,$4,$5);",
@@ -529,7 +529,7 @@ postgres_prepare (PGconn *db_conn)
GNUNET_PQ_make_prepare ("wire_auditor_progress_update",
"UPDATE wire_auditor_progress SET "
" last_wire_reserve_in_serial_id=$1"
- ",last_wire_reserve_out_serial_id=$2"
+ ",last_wire_wire_out_serial_id=$2"
",wire_in_off=$3"
",wire_out_off=$4"
" WHERE master_pub=$5",
@@ -538,7 +538,7 @@ postgres_prepare (PGconn *db_conn)
GNUNET_PQ_make_prepare ("wire_auditor_progress_select",
"SELECT"
" last_wire_reserve_in_serial_id"
- ",last_wire_reserve_out_serial_id"
+ ",last_wire_wire_out_serial_id"
",wire_in_off"
",wire_out_off"
" FROM wire_auditor_progress"
@@ -1352,7 +1352,7 @@ postgres_insert_wire_auditor_progress (void *cls,
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (master_pub),
GNUNET_PQ_query_param_uint64 (&pp->last_reserve_in_serial_id),
- GNUNET_PQ_query_param_uint64 (&pp->last_reserve_out_serial_id),
+ GNUNET_PQ_query_param_uint64 (&pp->last_wire_out_serial_id),
GNUNET_PQ_query_param_fixed_size (in_wire_off,
wire_off_size),
GNUNET_PQ_query_param_fixed_size (out_wire_off,
@@ -1387,7 +1387,7 @@ postgres_update_wire_auditor_progress (void *cls,
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_uint64 (&pp->last_reserve_in_serial_id),
- GNUNET_PQ_query_param_uint64 (&pp->last_reserve_out_serial_id),
+ GNUNET_PQ_query_param_uint64 (&pp->last_wire_out_serial_id),
GNUNET_PQ_query_param_auto_from_type (master_pub),
GNUNET_PQ_query_param_fixed_size (in_wire_off,
wire_off_size),
@@ -1429,8 +1429,8 @@ postgres_get_wire_auditor_progress (void *cls,
struct GNUNET_PQ_ResultSpec rs[] = {
GNUNET_PQ_result_spec_uint64 ("last_reserve_in_serial_id",
&pp->last_reserve_in_serial_id),
- GNUNET_PQ_result_spec_uint64 ("last_reserve_out_serial_id",
- &pp->last_reserve_out_serial_id),
+ GNUNET_PQ_result_spec_uint64 ("last_wire_out_serial_id",
+ &pp->last_wire_out_serial_id),
GNUNET_PQ_result_spec_variable_size ("wire_in_off",
in_wire_off,
wire_off_size),