summaryrefslogtreecommitdiff
path: root/src/exchangedb/irbt_callbacks.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-01-10 18:06:18 +0100
committerChristian Grothoff <christian@grothoff.org>2021-01-10 18:06:18 +0100
commitaf97a44ae6cdd3c9ee1e15fc88081dcd6890a03d (patch)
tree9eda8d79afbb02a1761d7cb85acf6ee8b7a2c8a9 /src/exchangedb/irbt_callbacks.c
parentf70c53d2d60ddc3627d2f58ad0e5a3f69b9f3dd7 (diff)
downloadexchange-af97a44ae6cdd3c9ee1e15fc88081dcd6890a03d.tar.gz
exchange-af97a44ae6cdd3c9ee1e15fc88081dcd6890a03d.tar.bz2
exchange-af97a44ae6cdd3c9ee1e15fc88081dcd6890a03d.zip
complete select_serial_by_* SELECT statements
Diffstat (limited to 'src/exchangedb/irbt_callbacks.c')
-rw-r--r--src/exchangedb/irbt_callbacks.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/exchangedb/irbt_callbacks.c b/src/exchangedb/irbt_callbacks.c
index 703f0f32..036ed2eb 100644
--- a/src/exchangedb/irbt_callbacks.c
+++ b/src/exchangedb/irbt_callbacks.c
@@ -37,12 +37,40 @@ irbt_cb_table_denominations (struct PostgresClosure *pg,
struct TALER_EXCHANGEDB_Session *session,
const struct TALER_EXCHANGEDB_TableData *td)
{
+ struct GNUNET_HashCode denom_hash;
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_uint64 (&td->serial),
+ GNUNET_PQ_query_param_auto_from_type (&denom_hash),
+ GNUNET_PQ_query_param_rsa_public_key (
+ td->details.denominations.denom_pub.rsa_public_key),
+ // GNUNET_PQ_query_param_auto_from_type (&master_pub), // FIXME: !?
+ GNUNET_PQ_query_param_auto_from_type (
+ &td->details.denominations.master_sig),
+ TALER_PQ_query_param_absolute_time (
+ &td->details.denominations.valid_from),
+ TALER_PQ_query_param_absolute_time (
+ &td->details.denominations.expire_withdraw),
+ TALER_PQ_query_param_absolute_time (
+ &td->details.denominations.expire_deposit),
+ TALER_PQ_query_param_absolute_time (
+ &td->details.denominations.expire_legal),
+ TALER_PQ_query_param_amount (&td->details.denominations.coin),
+ TALER_PQ_query_param_amount (
+ &td->details.denominations.fee_withdraw),
+ TALER_PQ_query_param_amount (
+ &td->details.denominations.fee_deposit),
+ TALER_PQ_query_param_amount (
+ &td->details.denominations.fee_refresh),
+ TALER_PQ_query_param_amount (
+ &td->details.denominations.fee_refund),
GNUNET_PQ_query_param_end
};
(void) pg;
+ GNUNET_CRYPTO_rsa_public_key_hash (
+ td->details.denominations.denom_pub.rsa_public_key,
+ &denom_hash);
+
return GNUNET_PQ_eval_prepared_non_select (session->conn,
"insert_into_table_denominations",
params);
@@ -64,6 +92,10 @@ irbt_cb_table_denomination_revocations (struct PostgresClosure *pg,
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_uint64 (&td->serial),
+ GNUNET_PQ_query_param_auto_from_type (
+ &td->details.denomination_revocations.master_sig),
+ GNUNET_PQ_query_param_uint64 (
+ &td->details.denomination_revocations.denominations_serial),
GNUNET_PQ_query_param_end
};
@@ -88,6 +120,11 @@ irbt_cb_table_reserves (struct PostgresClosure *pg,
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_uint64 (&td->serial),
+ GNUNET_PQ_query_param_auto_from_type (&td->details.reserves.reserve_pub),
+ GNUNET_PQ_query_param_string (td->details.reserves.account_details),
+ TALER_PQ_query_param_amount (&td->details.reserves.current_balance),
+ TALER_PQ_query_param_absolute_time (&td->details.reserves.expiration_date),
+ TALER_PQ_query_param_absolute_time (&td->details.reserves.gc_date),
GNUNET_PQ_query_param_end
};