diff options
Diffstat (limited to 'src/auditordb')
-rw-r--r-- | src/auditordb/plugin_auditordb_postgres.c | 23 |
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), |