summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_refreshes_reveal.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-11-14 06:43:21 +0100
committerChristian Grothoff <christian@grothoff.org>2022-11-14 06:43:21 +0100
commit41e3c1ecbf0c437f58be3084a9401aa71c515a62 (patch)
tree998358f3a2618a61ab58bc655e0bff039ca0c276 /src/exchange/taler-exchange-httpd_refreshes_reveal.c
parent8bfc6583e799d8f7d0e55262b593183daed7f4fe (diff)
downloadexchange-41e3c1ecbf0c437f58be3084a9401aa71c515a62.tar.gz
exchange-41e3c1ecbf0c437f58be3084a9401aa71c515a62.tar.bz2
exchange-41e3c1ecbf0c437f58be3084a9401aa71c515a62.zip
implement batch operation in handlers
Diffstat (limited to 'src/exchange/taler-exchange-httpd_refreshes_reveal.c')
-rw-r--r--src/exchange/taler-exchange-httpd_refreshes_reveal.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/exchange/taler-exchange-httpd_refreshes_reveal.c b/src/exchange/taler-exchange-httpd_refreshes_reveal.c
index 56848d581..08a85265c 100644
--- a/src/exchange/taler-exchange-httpd_refreshes_reveal.c
+++ b/src/exchange/taler-exchange-httpd_refreshes_reveal.c
@@ -750,20 +750,21 @@ clean_age:
(unsigned int) rctx->num_fresh_coins);
/* create fresh coin signatures */
- for (unsigned int i = 0; i<rctx->num_fresh_coins; i++)
{
+ struct TEH_CoinSignData csds[rctx->num_fresh_coins];
+ struct TALER_BlindedDenominationSignature bss[rctx->num_fresh_coins];
enum TALER_ErrorCode ec;
- struct TEH_CoinSignData csd = {
- .h_denom_pub = &rrcs[i].h_denom_pub,
- .bp = &rcds[i].blinded_planchet
- };
- // FIXME #7272: replace with a batch call that
- // passes all coins in once go!
- ec = TEH_keys_denomination_sign (
- &csd,
+ for (unsigned int i = 0; i<rctx->num_fresh_coins; i++)
+ {
+ csds[i].h_denom_pub = &rrcs[i].h_denom_pub;
+ csds[i].bp = &rcds[i].blinded_planchet;
+ }
+ ec = TEH_keys_denomination_batch_sign (
+ csds,
+ rctx->num_fresh_coins,
true,
- &rrcs[i].coin_sig);
+ bss);
if (TALER_EC_NONE != ec)
{
GNUNET_break (0);
@@ -772,8 +773,9 @@ clean_age:
NULL);
goto cleanup;
}
+ for (unsigned int i = 0; i<rctx->num_fresh_coins; i++)
+ rrcs[i].coin_sig = bss[i];
}
-
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Signatures ready, starting DB interaction\n");