diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-12-25 15:39:01 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-12-25 15:39:01 +0100 |
commit | f6ecb6c895879ee4b5db3061593feaad3456d1c8 (patch) | |
tree | 81be844db2e275015592ca70994e90be013c9c87 /src/util | |
parent | 84c9adf5a6a243bd583f2144176f80708fa6a884 (diff) | |
download | exchange-f6ecb6c895879ee4b5db3061593feaad3456d1c8.tar.xz |
-eliminate redundant hash operation on link signatures
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/wallet_signatures.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/util/wallet_signatures.c b/src/util/wallet_signatures.c index 9c3723b0a..c46dd670b 100644 --- a/src/util/wallet_signatures.c +++ b/src/util/wallet_signatures.c @@ -133,9 +133,7 @@ enum GNUNET_GenericReturnValue TALER_wallet_link_verify ( const struct TALER_DenominationHash *h_denom_pub, const struct TALER_TransferPublicKeyP *transfer_pub, - // FIXME: consider passing hash! - const void *coin_ev, - size_t coin_ev_size, + const struct TALER_BlindedCoinHash *h_coin_ev, const struct TALER_CoinSpendPublicKeyP *old_coin_pub, const struct TALER_CoinSpendSignatureP *coin_sig) { @@ -143,12 +141,10 @@ TALER_wallet_link_verify ( .purpose.size = htonl (sizeof (ldp)), .purpose.purpose = htonl (TALER_SIGNATURE_WALLET_COIN_LINK), .h_denom_pub = *h_denom_pub, - .transfer_pub = *transfer_pub + .transfer_pub = *transfer_pub, + .coin_envelope_hash = *h_coin_ev }; - GNUNET_CRYPTO_hash (coin_ev, - coin_ev_size, - &ldp.coin_envelope_hash.hash); return GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_WALLET_COIN_LINK, &ldp, |