summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_refresh_reveal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchange/taler-exchange-httpd_refresh_reveal.c')
-rw-r--r--src/exchange/taler-exchange-httpd_refresh_reveal.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/exchange/taler-exchange-httpd_refresh_reveal.c b/src/exchange/taler-exchange-httpd_refresh_reveal.c
index 8062410e3..6eaa286d7 100644
--- a/src/exchange/taler-exchange-httpd_refresh_reveal.c
+++ b/src/exchange/taler-exchange-httpd_refresh_reveal.c
@@ -195,11 +195,16 @@ check_exists_cb (void *cls,
GNUNET_break_op (0 == memcmp (tprivs,
&rctx->transfer_privs,
sizeof (struct TALER_TransferPrivateKeyP) * num_tprivs));
- rctx->ev_sigs = GNUNET_new_array (num_newcoins,
- struct TALER_DenominationSignature);
- for (unsigned int i=0;i<num_newcoins;i++)
- rctx->ev_sigs[i].rsa_signature
- = GNUNET_CRYPTO_rsa_signature_dup (rrcs[i].coin_sig.rsa_signature);
+ /* We usually sign early (optimistic!), but in case we change that *and*
+ we do find the operation in the database, we could use this: */
+ if (NULL == rctx->ev_sigs)
+ {
+ rctx->ev_sigs = GNUNET_new_array (num_newcoins,
+ struct TALER_DenominationSignature);
+ for (unsigned int i=0;i<num_newcoins;i++)
+ rctx->ev_sigs[i].rsa_signature
+ = GNUNET_CRYPTO_rsa_signature_dup (rrcs[i].coin_sig.rsa_signature);
+ }
}