From be9ff317dd47d12a9a9c31a0c867b51fa27ebb1b Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 28 Oct 2018 11:38:45 +0100 Subject: add operation to count number of known coins per denomination to exchangedb --- src/include/taler_exchangedb_plugin.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/include/taler_exchangedb_plugin.h') diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index ee58dd437..c8417a3a7 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -1397,6 +1397,20 @@ struct TALER_EXCHANGEDB_Plugin struct TALER_EXCHANGEDB_ReserveHistory *rh); + /** + * Count the number of known coins by denomination. + * + * @param cls database connection plugin state + * @param session database session + * @param denom_pub_hash denomination to count by + * @return number of coins if non-negative, otherwise an `enum GNUNET_DB_QueryStatus` + */ + long long + (*count_known_coins) (void *cls, + struct TALER_EXCHANGEDB_Session *session, + const struct GNUNET_HashCode *denom_pub_hash); + + /** * Make sure the given @a coin is known to the database. * -- cgit v1.2.3