summaryrefslogtreecommitdiff
path: root/src/auditordb/plugin_auditordb_postgres.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-03-20 02:45:33 +0100
committerChristian Grothoff <christian@grothoff.org>2017-03-20 02:45:33 +0100
commit3fde028650e220157f208fa8399d32cc1b0eebde (patch)
tree2dbc393a8f279abbf6fb629f15511a85e9176178 /src/auditordb/plugin_auditordb_postgres.c
parenta38fa32484286d2895dca10d3f53d3c7599d2f3b (diff)
downloadexchange-3fde028650e220157f208fa8399d32cc1b0eebde.tar.gz
exchange-3fde028650e220157f208fa8399d32cc1b0eebde.tar.bz2
exchange-3fde028650e220157f208fa8399d32cc1b0eebde.zip
fix auditor progress point issue
Diffstat (limited to 'src/auditordb/plugin_auditordb_postgres.c')
-rw-r--r--src/auditordb/plugin_auditordb_postgres.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/auditordb/plugin_auditordb_postgres.c b/src/auditordb/plugin_auditordb_postgres.c
index 74dff928..2a63eebd 100644
--- a/src/auditordb/plugin_auditordb_postgres.c
+++ b/src/auditordb/plugin_auditordb_postgres.c
@@ -299,6 +299,7 @@ postgres_create_tables (void *cls)
"(master_pub BYTEA PRIMARY KEY CHECK (LENGTH(master_pub)=32)"
",last_reserve_in_serial_id INT8 NOT NULL"
",last_reserve_out_serial_id INT8 NOT NULL"
+ ",last_withdraw_serial_id INT8 NOT NULL"
",last_deposit_serial_id INT8 NOT NULL"
",last_melt_serial_id INT8 NOT NULL"
",last_refund_serial_id INT8 NOT NULL"
@@ -562,30 +563,33 @@ postgres_prepare (PGconn *db_conn)
"(master_pub"
",last_reserve_in_serial_id"
",last_reserve_out_serial_id"
+ ",last_withdraw_serial_id"
",last_deposit_serial_id"
",last_melt_serial_id"
",last_refund_serial_id"
",last_wire_out_serial_id"
- ") VALUES ($1,$2,$3,$4,$5,$6,$7);",
- 7, NULL);
+ ") VALUES ($1,$2,$3,$4,$5,$6,$7,$8);",
+ 8, NULL);
/* Used in #postgres_update_auditor_progress() */
PREPARE ("auditor_progress_update",
"UPDATE auditor_progress SET "
" last_reserve_in_serial_id=$1"
",last_reserve_out_serial_id=$2"
- ",last_deposit_serial_id=$3"
- ",last_melt_serial_id=$4"
- ",last_refund_serial_id=$5"
- ",last_wire_out_serial_id=$6"
- " WHERE master_pub=$7",
- 7, NULL);
+ ",last_withdraw_serial_id=$3"
+ ",last_deposit_serial_id=$4"
+ ",last_melt_serial_id=$5"
+ ",last_refund_serial_id=$6"
+ ",last_wire_out_serial_id=$7"
+ " WHERE master_pub=$8",
+ 8, NULL);
/* Used in #postgres_get_auditor_progress() */
PREPARE ("auditor_progress_select",
"SELECT"
" last_reserve_in_serial_id"
",last_reserve_out_serial_id"
+ ",last_withdraw_serial_id"
",last_deposit_serial_id"
",last_melt_serial_id"
",last_refund_serial_id"
@@ -1264,6 +1268,7 @@ postgres_insert_auditor_progress (void *cls,
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_withdraw_serial_id),
GNUNET_PQ_query_param_uint64 (&pp->last_deposit_serial_id),
GNUNET_PQ_query_param_uint64 (&pp->last_melt_serial_id),
GNUNET_PQ_query_param_uint64 (&pp->last_refund_serial_id),
@@ -1309,6 +1314,7 @@ postgres_update_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_withdraw_serial_id),
GNUNET_PQ_query_param_uint64 (&pp->last_deposit_serial_id),
GNUNET_PQ_query_param_uint64 (&pp->last_melt_serial_id),
GNUNET_PQ_query_param_uint64 (&pp->last_refund_serial_id),
@@ -1359,6 +1365,7 @@ postgres_get_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_withdraw_serial_id", &pp->last_withdraw_serial_id),
GNUNET_PQ_result_spec_uint64 ("last_deposit_serial_id", &pp->last_deposit_serial_id),
GNUNET_PQ_result_spec_uint64 ("last_melt_serial_id", &pp->last_melt_serial_id),
GNUNET_PQ_result_spec_uint64 ("last_refund_serial_id", &pp->last_refund_serial_id),