aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-05-02 21:16:51 +0200
committerChristian Grothoff <christian@grothoff.org>2019-05-02 21:16:51 +0200
commitde9fdf860af9bdeadee4ed21a2c03dc34d58dd86 (patch)
tree3d675e05534998a94087dc2d626566eceb0ade91 /src/include
parentd821ecc3bb23df1a326fcbdf4cb08841322db7aa (diff)
replace denom_pub with denom_pub_hash in exchange API to reduce bandwidth
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_crypto_lib.h10
-rw-r--r--src/include/taler_exchangedb_plugin.h9
2 files changed, 11 insertions, 8 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index f12516177..18c214e19 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -354,10 +354,10 @@ struct TALER_CoinPublicInfo
struct TALER_CoinSpendPublicKeyP coin_pub;
/**
- * Public key representing the denomination of the coin
- * that is being deposited.
+ * Hash of the public key representing the denomination of the coin that is
+ * being deposited.
*/
- struct TALER_DenominationPublicKey denom_pub;
+ struct GNUNET_HashCode denom_pub_hash;
/**
* (Unblinded) signature over @e coin_pub with @e denom_pub,
@@ -401,12 +401,14 @@ struct TALER_TrackTransferDetails
* is not expired, and the signature is correct.
*
* @param coin_public_info the coin public info to check for validity
+ * @param denom_pub denomination key, must match @a coin_public_info's `denom_pub_hash`
* @return #GNUNET_YES if the coin is valid,
* #GNUNET_NO if it is invalid
* #GNUNET_SYSERR if an internal error occured
*/
int
-TALER_test_coin_valid (const struct TALER_CoinPublicInfo *coin_public_info);
+TALER_test_coin_valid (const struct TALER_CoinPublicInfo *coin_public_info,
+ const struct TALER_DenominationPublicKey *denom_pub);
GNUNET_NETWORK_STRUCT_BEGIN
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index 2d9f14208..0a46c7264 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -147,9 +147,9 @@ struct TALER_EXCHANGEDB_CollectableBlindcoin
struct TALER_DenominationSignature sig;
/**
- * Denomination key (which coin was generated).
+ * Hash of the denomination key (which coin was generated).
*/
- struct TALER_DenominationPublicKey denom_pub;
+ struct GNUNET_HashCode denom_pub_hash;
/**
* Value of the coin being exchangeed (matching the denomination key)
@@ -1045,6 +1045,7 @@ typedef int
const struct TALER_Amount *amount,
const struct TALER_ReservePublicKeyP *reserve_pub,
const struct TALER_CoinPublicInfo *coin,
+ const struct TALER_DenominationPublicKey *denom_pub,
const struct TALER_CoinSpendSignatureP *coin_sig,
const struct TALER_DenominationBlindingKeyP *coin_blind);
@@ -1274,14 +1275,14 @@ struct TALER_EXCHANGEDB_Plugin
*
* @param cls the @e cls of this struct with the plugin-specific state
* @param session connection to use
- * @param denom_pub the public key used for signing coins of this denomination
+ * @param denom_pub_hash hash of the public key used for signing coins of this denomination
* @param[out] issue set to issue information with value, fees and other info about the coin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
(*get_denomination_info) (void *cls,
struct TALER_EXCHANGEDB_Session *session,
- const struct TALER_DenominationPublicKey *denom_pub,
+ const struct GNUNET_HashCode *denom_pub_hash,
struct TALER_EXCHANGEDB_DenominationKeyInformationP *issue);