aboutsummaryrefslogtreecommitdiff
path: root/src/include/taler_exchangedb_plugin.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-12-09 23:13:39 +0100
committerChristian Grothoff <christian@grothoff.org>2021-12-09 23:13:39 +0100
commitfba91c63d57d73732249b972127575ca1fd4d5ff (patch)
tree9ceedd346da020458124a235f928c9408a9df31b /src/include/taler_exchangedb_plugin.h
parent889625a90f97a23048b3c9dad418f86acb81314b (diff)
introduce stored procedure for coin balance check
Diffstat (limited to 'src/include/taler_exchangedb_plugin.h')
-rw-r--r--src/include/taler_exchangedb_plugin.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index fd2f3dc42..56a16dd72 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -2503,18 +2503,27 @@ struct TALER_EXCHANGEDB_Plugin
/**
- * Store collectable coin under the corresponding hash of the blinded
- * message.
+ * Check coin balance is sufficient to satisfy balance
+ * invariants.
*
- * @param cls the @e cls of this struct with the plugin-specific state
- * @param collectable corresponding collectable coin (blind signature)
- * if a coin is found
- * @return statement execution status
+ * @param cls the `struct PostgresClosure` with the plugin-specific state
+ * @param coin_pub coin to check
+ * @param coin_value value of the coin's denomination (avoids internal lookup)
+ * @param check_recoup include recoup and recoup_refresh tables in calculation
+ * @param zombie_required additionally require coin to be a zombie coin
+ * @param[out] balance_ok set to true if the balance was sufficient
+ * @param[out] zombie_ok set to true if the zombie requirement was satisfied
+ * @return query execution status
*/
enum GNUNET_DB_QueryStatus
- (*insert_withdraw_infoXX)(
+ (*do_check_coin_balance)(
void *cls,
- const struct TALER_EXCHANGEDB_CollectableBlindcoin *collectable);
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ const struct TALER_Amount *coin_value,
+ bool check_recoup,
+ bool zombie_required,
+ bool *balance_ok,
+ bool *zombie_ok);
/**