summaryrefslogtreecommitdiff
path: root/src/auditordb/plugin_auditordb_postgres.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-06-13 15:31:52 +0200
committerChristian Grothoff <christian@grothoff.org>2022-06-13 15:31:52 +0200
commit58a0882909f2b1ede572ae575b83c18746f96cff (patch)
tree8d96afaec04abb7fd82d32a7a1b8b4ca1e9dd52d /src/auditordb/plugin_auditordb_postgres.c
parent70a5ceecc1a15d4f811636f5980cedf653988879 (diff)
downloadexchange-58a0882909f2b1ede572ae575b83c18746f96cff.tar.gz
exchange-58a0882909f2b1ede572ae575b83c18746f96cff.tar.bz2
exchange-58a0882909f2b1ede572ae575b83c18746f96cff.zip
-towards coin audits with purse deposits
Diffstat (limited to 'src/auditordb/plugin_auditordb_postgres.c')
-rw-r--r--src/auditordb/plugin_auditordb_postgres.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/auditordb/plugin_auditordb_postgres.c b/src/auditordb/plugin_auditordb_postgres.c
index 26560465a..df1d4732f 100644
--- a/src/auditordb/plugin_auditordb_postgres.c
+++ b/src/auditordb/plugin_auditordb_postgres.c
@@ -314,8 +314,9 @@ setup_connection (struct PostgresClosure *pg)
",last_recoup_serial_id=$5"
",last_recoup_refresh_serial_id=$6"
",last_purse_deposits_serial_id=$7"
- " WHERE master_pub=$8",
- 8),
+ ",last_purse_refunds_serial_id=$8"
+ " WHERE master_pub=$9",
+ 9),
/* Used in #postgres_get_auditor_progress_coin() */
GNUNET_PQ_make_prepare ("auditor_progress_select_coin",
"SELECT"
@@ -326,6 +327,7 @@ setup_connection (struct PostgresClosure *pg)
",last_recoup_serial_id"
",last_recoup_refresh_serial_id"
",last_purse_deposits_serial_id"
+ ",last_purse_refunds_serial_id"
" FROM auditor_progress_coin"
" WHERE master_pub=$1;",
1),
@@ -340,8 +342,9 @@ setup_connection (struct PostgresClosure *pg)
",last_recoup_serial_id"
",last_recoup_refresh_serial_id"
",last_purse_deposits_serial_id"
- ") VALUES ($1,$2,$3,$4,$5,$6,$7,$8);",
- 8),
+ ",last_purse_refunds_serial_id"
+ ") VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9);",
+ 9),
/* Used in #postgres_insert_wire_auditor_account_progress() */
GNUNET_PQ_make_prepare ("wire_auditor_account_progress_insert",
"INSERT INTO wire_auditor_account_progress "
@@ -1535,6 +1538,7 @@ postgres_insert_auditor_progress_coin (
GNUNET_PQ_query_param_uint64 (&ppc->last_recoup_serial_id),
GNUNET_PQ_query_param_uint64 (&ppc->last_recoup_refresh_serial_id),
GNUNET_PQ_query_param_uint64 (&ppc->last_purse_deposits_serial_id),
+ GNUNET_PQ_query_param_uint64 (&ppc->last_purse_refunds_serial_id),
GNUNET_PQ_query_param_end
};
@@ -1568,6 +1572,7 @@ postgres_update_auditor_progress_coin (
GNUNET_PQ_query_param_uint64 (&ppc->last_recoup_serial_id),
GNUNET_PQ_query_param_uint64 (&ppc->last_recoup_refresh_serial_id),
GNUNET_PQ_query_param_uint64 (&ppc->last_purse_deposits_serial_id),
+ GNUNET_PQ_query_param_uint64 (&ppc->last_purse_refunds_serial_id),
GNUNET_PQ_query_param_auto_from_type (master_pub),
GNUNET_PQ_query_param_end
};
@@ -1612,6 +1617,8 @@ postgres_get_auditor_progress_coin (
&ppc->last_recoup_refresh_serial_id),
GNUNET_PQ_result_spec_uint64 ("last_purse_deposits_serial_id",
&ppc->last_purse_deposits_serial_id),
+ GNUNET_PQ_result_spec_uint64 ("last_purse_refunds_serial_id",
+ &ppc->last_purse_refunds_serial_id),
GNUNET_PQ_result_spec_end
};