aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-04-19 21:28:47 +0200
committerChristian Grothoff <christian@grothoff.org>2017-04-19 21:28:47 +0200
commit4bf52369591764fec0501694ae0d52f9670fcbec (patch)
tree8fe0149ce184d4e25fe14c4ed8a0210e300e91a9 /src/include
parent13a153616e07874b9e70d8b72dd44cebc8766f2c (diff)
implement plugin function for auditor to check reserve closures
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_exchangedb_plugin.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index 710f556d5..6c640baec 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -970,6 +970,31 @@ typedef int
/**
+ * Function called about reserve closing operations
+ * the aggregator triggered.
+ *
+ * @param cls closure
+ * @param rowid row identifier used to uniquely identify the reserve closing operation
+ * @param execution_date when did we execute the close operation
+ * @param amount_with_fee how much did we debit the reserve
+ * @param closing_fee how much did we charge for closing the reserve
+ * @param reserve_pub public key of the reserve
+ * @param receiver_account where did we send the funds
+ * @param transfer_details details about the wire transfer
+ * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
+ */
+typedef int
+(*TALER_EXCHANGEDB_ReserveClosedCallback)(void *cls,
+ uint64_t rowid,
+ struct GNUNET_TIME_Absolute execution_date,
+ const struct TALER_Amount *amount_with_fee,
+ const struct TALER_Amount *closing_fee,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ const json_t *receiver_account,
+ const json_t *transfer_details);
+
+
+/**
* Function called with information justifying an aggregate payback.
* (usually implemented by the auditor when verifying losses from paybacks).
*
@@ -2032,6 +2057,27 @@ struct TALER_EXCHANGEDB_Plugin
/**
+ * Function called to select reserve close operations the aggregator
+ * triggered, ordered by serial ID (monotonically increasing).
+ *
+ * @param cls closure
+ * @param session database connection
+ * @param serial_id lowest serial ID to include (select larger or equal)
+ * @param cb function to call
+ * @param cb_cls closure for @a cb
+ * @return #GNUNET_OK on success,
+ * #GNUNET_NO if there are no entries,
+ * #GNUNET_SYSERR on DB errors
+ */
+ int
+ (*select_reserve_closed_above_serial_id)(void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_ReserveClosedCallback cb,
+ void *cb_cls);
+
+
+ /**
* Function called to add a request for an emergency payback for a
* coin. The funds are to be added back to the reserve. The
* function should return the @a deadline by which the exchange will