summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2023-03-31 14:03:12 +0200
committerChristian Grothoff <grothoff@gnunet.org>2023-03-31 14:03:12 +0200
commita30827fcef87af1c5a9707f31c58b7b69f7b9ae8 (patch)
treeb7936d51f6c90edd272763e3083aa16449b957c1
parent6eed8917c37ad047ee95e964cd516d82aacac473 (diff)
downloadexchange-a30827fcef87af1c5a9707f31c58b7b69f7b9ae8.tar.gz
exchange-a30827fcef87af1c5a9707f31c58b7b69f7b9ae8.tar.bz2
exchange-a30827fcef87af1c5a9707f31c58b7b69f7b9ae8.zip
-fix missing comments
-rw-r--r--src/include/taler_exchangedb_plugin.h55
1 files changed, 49 insertions, 6 deletions
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index 30d48833c..a0caf4f85 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -29,13 +29,43 @@
#include "taler_extensions_policy.h"
+/**
+ * Per-coin information returned when doing a batch insert.
+ */
struct TALER_EXCHANGEDB_CoinInfo
{
+ /**
+ * Row of the coin in the known_coins table.
+ */
uint64_t known_coin_id;
+
+ /**
+ * Hash of the denomination, relevant on @e denom_conflict.
+ */
struct TALER_DenominationHashP denom_hash;
+
+ /**
+ * Hash of the age commitment, relevant on @e age_conflict.
+ */
struct TALER_AgeCommitmentHash h_age_commitment;
+
+ /**
+ * True if the coin was known previously.
+ */
bool existed;
+
+ /**
+ * True if the known coin has a different denomination;
+ * application will find denomination of the already
+ * known coin in @e denom_hash.
+ */
bool denom_conflict;
+
+ /**
+ * True if the known coin has a different age restriction;
+ * application will find age commitment of the already
+ * known coin in @e h_age_commitment.
+ */
bool age_conflict;
};
@@ -4038,13 +4068,26 @@ struct TALER_EXCHANGEDB_Plugin
struct TALER_DenominationHashP *denom_pub_hash,
struct TALER_AgeCommitmentHash *age_hash);
+
+ /**
+ * Make sure the array of given @a coin is known to the database.
+ *
+ * @param cls database connection plugin state
+ * @param coin array of coins that must be made known
+ * @param[out] result array where to store information about each coin
+ * @param coin_length length of the @a coin and @a result arraysf
+ * @param batch_size desired (maximum) batch size
+ * @return database transaction status, non-negative on success
+ */
enum GNUNET_DB_QueryStatus
- (*batch_ensure_coin_known)(void *cls,
- const struct TALER_CoinPublicInfo *coin,
- struct
- TALER_EXCHANGEDB_CoinInfo *result,
- unsigned int coin_length,
- unsigned int batch_size);
+ (*batch_ensure_coin_known)(
+ void *cls,
+ const struct TALER_CoinPublicInfo *coin,
+ struct TALER_EXCHANGEDB_CoinInfo *result,
+ unsigned int coin_length,
+ unsigned int batch_size);
+
+
/**
* Retrieve information about the given @a coin from the database.
*