donau

Donation authority for GNU Taler (experimental)
Log | Files | Refs | Submodules | README | LICENSE

commit 87f088e4d0e5e9800ab98ed5842fd0cb129d2f82
parent 6985bfa6274d138258edac2d0625082560678b68
Author: Casaburi Johannes <johannes.casaburi@students.bfh.ch>
Date:   Sun, 17 Mar 2024 21:12:50 +0100

minor changes

Diffstat:
Msrc/donau/donau-httpd_keys.c | 13+++++++++----
Msrc/donaudb/0002-donation_units.sql | 6+++---
Msrc/donaudb/pg_insert_donation_unit.c | 7+++----
Msrc/donaudb/pg_insert_donation_unit.h | 4++--
Msrc/include/donaudb_plugin.h | 4++--
5 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/src/donau/donau-httpd_keys.c b/src/donau/donau-httpd_keys.c @@ -1528,9 +1528,12 @@ helper_rsa_cb ( &value); if (qs < 0) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Failed to insert donation units"); + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Failed to insert donation units\n"); // FIXME: error, probably should not proceed... } + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Inserted donation unit of %s\n", + TALER_amount2s (&value)); hd->section_name = GNUNET_strdup (section_name); GNUNET_assert ( GNUNET_OK == @@ -1630,10 +1633,12 @@ helper_cs_cb ( &value); if (qs < 0) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Failed to insert donation units"); + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Failed to insert donation units\n"); // FIXME: error, probably should not proceed... } - + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Inserted donation unit of %s\n", + TALER_amount2s (&value)); hd->section_name = GNUNET_strdup (section_name); GNUNET_assert ( GNUNET_OK == @@ -1991,7 +1996,7 @@ DH_keys_update_states () NULL, 0); key_generation++; - // DH_resume_keys_requests (false); + DH_resume_keys_requests (false); } diff --git a/src/donaudb/0002-donation_units.sql b/src/donaudb/0002-donation_units.sql @@ -26,6 +26,6 @@ COMMENT ON TABLE donation_units COMMENT ON COLUMN donation_units.value IS 'Value the donation unit has in Taler amount'; -CREATE INDEX donation_units_by_validity_year - ON donation_units - (validity_year); +-- CREATE INDEX IF NOT EXISTS donation_units_by_validity_year +-- ON donation_units +-- (validity_year); diff --git a/src/donaudb/pg_insert_donation_unit.c b/src/donaudb/pg_insert_donation_unit.c @@ -31,8 +31,8 @@ DH_PG_insert_donation_unit ( void *cls, const struct DONAU_DonationUnitHashP *h_donation_unit_pub, const struct DONAU_DonationUnitPublicKey *donation_unit_pub, - uint64_t validity_year, - struct TALER_Amount *value) + const uint64_t validity_year, + const struct TALER_Amount *value) { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam iparams[] = { @@ -50,8 +50,7 @@ DH_PG_insert_donation_unit ( ",donation_unit_pub" ",validity_year" ",value" - ") VALUES " - "($1, $2, $3, $4);"); + ") VALUES ($1, $2, $3, $4);"); return GNUNET_PQ_eval_prepared_non_select (pg->conn, "donation_unit_insert", iparams); diff --git a/src/donaudb/pg_insert_donation_unit.h b/src/donaudb/pg_insert_donation_unit.h @@ -40,7 +40,7 @@ DH_PG_insert_donation_unit ( void *cls, const struct DONAU_DonationUnitHashP *h_donation_unit_pub, const struct DONAU_DonationUnitPublicKey *donation_unit_pub, - uint64_t validity_year, - struct TALER_Amount *value); + const uint64_t validity_year, + const struct TALER_Amount *value); #endif diff --git a/src/include/donaudb_plugin.h b/src/include/donaudb_plugin.h @@ -450,8 +450,8 @@ struct DONAUDB_Plugin void *cls, const struct DONAU_DonationUnitHashP *h_donation_unit_pub, const struct DONAU_DonationUnitPublicKey *donation_unit_pub, - uint64_t validity_year, - struct TALER_Amount *value); + const uint64_t validity_year, + const struct TALER_Amount *value); /** * Insert history entry of a charity