From 58a0882909f2b1ede572ae575b83c18746f96cff Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 13 Jun 2022 15:31:52 +0200 Subject: -towards coin audits with purse deposits --- src/auditordb/plugin_auditordb_postgres.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/auditordb/plugin_auditordb_postgres.c') 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 }; -- cgit v1.2.3