summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-07-31 21:54:29 +0200
committerChristian Grothoff <christian@grothoff.org>2022-07-31 21:54:29 +0200
commit31bfe5234e9f1031306ce7cfae9a8a3fee5aa304 (patch)
tree0cda3cc1ef29226156c2774cd1d9f6f1957c495d /src/include
parentaf6a9a95469f98172c53ca10167210d41803bfb9 (diff)
downloadexchange-31bfe5234e9f1031306ce7cfae9a8a3fee5aa304.tar.gz
exchange-31bfe5234e9f1031306ce7cfae9a8a3fee5aa304.tar.bz2
exchange-31bfe5234e9f1031306ce7cfae9a8a3fee5aa304.zip
-update auditor schema in preparation to fix #4960
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_auditordb_plugin.h12
-rw-r--r--src/include/taler_exchangedb_plugin.h24
2 files changed, 33 insertions, 3 deletions
diff --git a/src/include/taler_auditordb_plugin.h b/src/include/taler_auditordb_plugin.h
index 0c01d1c47..dff96700f 100644
--- a/src/include/taler_auditordb_plugin.h
+++ b/src/include/taler_auditordb_plugin.h
@@ -1335,12 +1335,14 @@ struct TALER_AUDITORDB_Plugin
* @param cls the @e cls of this struct with the plugin-specific state
* @param master_pub master key of the exchange
* @param balance what the bank account balance of the exchange should show
+ * @param drained_profits total profits drained by the exchange so far
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
(*insert_predicted_result)(void *cls,
const struct TALER_MasterPublicKeyP *master_pub,
- const struct TALER_Amount *balance);
+ const struct TALER_Amount *balance,
+ const struct TALER_Amount *drained_profits);
/**
@@ -1350,12 +1352,14 @@ struct TALER_AUDITORDB_Plugin
* @param cls the @e cls of this struct with the plugin-specific state
* @param master_pub master key of the exchange
* @param balance what the bank account balance of the exchange should show
+ * @param drained_profits total profits drained by the exchange so far
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
(*update_predicted_result)(void *cls,
const struct TALER_MasterPublicKeyP *master_pub,
- const struct TALER_Amount *balance);
+ const struct TALER_Amount *balance,
+ const struct TALER_Amount *drained_profits);
/**
@@ -1364,12 +1368,14 @@ struct TALER_AUDITORDB_Plugin
* @param cls the @e cls of this struct with the plugin-specific state
* @param master_pub master key of the exchange
* @param[out] balance expected bank account balance of the exchange
+ * @param[out] drained_profits total profits drained by the exchange so far
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
(*get_predicted_balance)(void *cls,
const struct TALER_MasterPublicKeyP *master_pub,
- struct TALER_Amount *balance);
+ struct TALER_Amount *balance,
+ struct TALER_Amount *drained_profits);
};
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index 2ffa84866..5a5e8cab2 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -5546,6 +5546,30 @@ struct TALER_EXCHANGEDB_Plugin
/**
+ * Function called to get information about a profit drain event.
+ *
+ * @param cls the @e cls of this struct with the plugin-specific state
+ * @param wtid wire transfer ID to look up drain event for
+ * @param[out] serial set to serial ID of the entry
+ * @param[out] account_section set to account to drain
+ * @param[out] payto_uri set to account to wire funds to
+ * @param[out] request_timestamp set to time of the signature
+ * @param[out] amount set to amount to wire
+ * @param[out] master_sig set to signature affirming the operation
+ * @return transaction status code
+ */
+ enum GNUNET_DB_QueryStatus
+ (*get_drain_profit)(void *cls,
+ const struct TALER_WireTransferIdentifierRawP *wtid,
+ uint64_t *serial,
+ char **account_section,
+ char **payto_uri,
+ struct GNUNET_TIME_Timestamp *request_timestamp,
+ struct TALER_Amount *amount,
+ struct TALER_MasterSignatureP *master_sig);
+
+
+ /**
* Get profit drain operation ready to execute.
*
* @param cls the @e cls of this struct with the plugin-specific state