diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-06-13 15:31:52 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-06-13 15:31:52 +0200 |
commit | 58a0882909f2b1ede572ae575b83c18746f96cff (patch) | |
tree | 8d96afaec04abb7fd82d32a7a1b8b4ca1e9dd52d /src/exchangedb/irbt_callbacks.c | |
parent | 70a5ceecc1a15d4f811636f5980cedf653988879 (diff) | |
download | exchange-58a0882909f2b1ede572ae575b83c18746f96cff.tar.xz |
-towards coin audits with purse deposits
Diffstat (limited to 'src/exchangedb/irbt_callbacks.c')
-rw-r--r-- | src/exchangedb/irbt_callbacks.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/exchangedb/irbt_callbacks.c b/src/exchangedb/irbt_callbacks.c index 820911956..250b167ef 100644 --- a/src/exchangedb/irbt_callbacks.c +++ b/src/exchangedb/irbt_callbacks.c @@ -810,6 +810,8 @@ irbt_cb_table_purse_requests (struct PostgresClosure *pg, struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_uint64 (&td->serial), GNUNET_PQ_query_param_auto_from_type ( + &td->details.purse_requests.purse_pub), + GNUNET_PQ_query_param_auto_from_type ( &td->details.purse_requests.merge_pub), GNUNET_PQ_query_param_timestamp ( &td->details.purse_requests.purse_creation), @@ -833,6 +835,29 @@ irbt_cb_table_purse_requests (struct PostgresClosure *pg, /** + * Function called with purse_refunds records to insert into table. + * + * @param pg plugin context + * @param td record to insert + */ +static enum GNUNET_DB_QueryStatus +irbt_cb_table_purse_refunds (struct PostgresClosure *pg, + const struct TALER_EXCHANGEDB_TableData *td) +{ + struct GNUNET_PQ_QueryParam params[] = { + GNUNET_PQ_query_param_uint64 (&td->serial), + GNUNET_PQ_query_param_auto_from_type ( + &td->details.purse_refunds.purse_pub), + GNUNET_PQ_query_param_end + }; + + return GNUNET_PQ_eval_prepared_non_select (pg->conn, + "insert_into_table_purse_refunds", + params); +} + + +/** * Function called with purse_merges records to insert into table. * * @param pg plugin context |