From 7fd6be5cef06d0bd495f4e03d33c4d6f04c36131 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 17 Nov 2016 16:37:40 +0100 Subject: add idempotency checks for /refresh/reveal, fixing #4793 --- src/include/taler_exchangedb_plugin.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/include') diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index 02d41f2bf..19fb1d042 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -1359,6 +1359,27 @@ struct TALER_EXCHANGEDB_Plugin struct TALER_TransferPublicKeyP *tp); + /** + * Get signature of a new coin generated during refresh into + * the database indexed by the refresh session and the index + * of the coin. + * + * @param cls the @e cls of this struct with the plugin-specific state + * @param session database connection + * @param session_hash hash to identify refresh session + * @param newcoin_index coin index + * @param[out] ev_sig coin signature + * @return #GNUNET_OK on success, #GNUNET_NO if we have no such entry, + * #GNUNET_SYSERR on error + */ + int + (*get_refresh_out) (void *cls, + struct TALER_EXCHANGEDB_Session *session, + const struct GNUNET_HashCode *session_hash, + uint16_t newcoin_index, + struct TALER_DenominationSignature *ev_sig); + + /** * Insert signature of a new coin generated during refresh into * the database indexed by the refresh session and the index @@ -1371,6 +1392,7 @@ struct TALER_EXCHANGEDB_Plugin * @param newcoin_index coin index * @param ev_sig coin signature * @return #GNUNET_OK on success + * #GNUNET_SYSERR on error */ int (*insert_refresh_out) (void *cls, -- cgit v1.2.3