aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/plugin_exchangedb_postgres.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-05-16 15:43:40 +0200
committerChristian Grothoff <christian@grothoff.org>2022-05-16 15:43:40 +0200
commit02716c4084c76630f35a5fcc4d2ef4e17d7e1b00 (patch)
tree3cdb2b705adb891dbda37bf44b0e08443bbea5fb /src/exchangedb/plugin_exchangedb_postgres.c
parentd803d86bf9c69947f6b6e37caf8800abbd24135f (diff)
-add skeleton logic for purse expiration
Diffstat (limited to 'src/exchangedb/plugin_exchangedb_postgres.c')
-rw-r--r--src/exchangedb/plugin_exchangedb_postgres.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c
index 4d5efb9c..ab282f4f 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -13555,6 +13555,25 @@ postgres_insert_purse_request (
/**
+ * Function called to clean up one expired purse.
+ *
+ * @param cls the @e cls of this struct with the plugin-specific state
+ * @param start_time select purse expired after this time
+ * @param end_time select purse expired before this time
+ * @return transaction status code (#GNUNET_DB_STATUS_SUCCESS_NO_RESULTS if no purse expired in the given time interval).
+ */
+static enum GNUNET_DB_QueryStatus
+postgres_expire_purse (
+ void *cls,
+ struct GNUNET_TIME_Absolute start_time,
+ struct GNUNET_TIME_Absolute end_time)
+{
+ GNUNET_break (0);
+ return GNUNET_DB_STATUS_HARD_ERROR;
+}
+
+
+/**
* Function called to obtain information about a purse.
*
* @param cls the @e cls of this struct with the plugin-specific state
@@ -14283,6 +14302,8 @@ libtaler_plugin_exchangedb_postgres_init (void *cls)
= &postgres_insert_purse_request;
plugin->select_purse_request
= &postgres_select_purse_request;
+ plugin->expire_purse
+ = &postgres_expire_purse;
plugin->select_purse
= &postgres_select_purse;
plugin->select_purse_by_merge_pub