summaryrefslogtreecommitdiff
path: root/src/lib/exchange_api_refreshes_reveal.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-01-10 00:54:12 +0100
committerChristian Grothoff <christian@grothoff.org>2021-01-10 00:54:12 +0100
commitca66a1d1af2412e3ad04c18150db7a259dc69b5e (patch)
tree83421873e49eec67f7012b4e21b21f31a3c9fa3a /src/lib/exchange_api_refreshes_reveal.c
parent02ecf68a3d9edde9ef48650f64b7332af845beee (diff)
downloadexchange-ca66a1d1af2412e3ad04c18150db7a259dc69b5e.tar.gz
exchange-ca66a1d1af2412e3ad04c18150db7a259dc69b5e.tar.bz2
exchange-ca66a1d1af2412e3ad04c18150db7a259dc69b5e.zip
fix major bug with SQL statement missing ORDER BY freshcoin_index resulting in possible link failures (but usually lucky with old DB schema)
Diffstat (limited to 'src/lib/exchange_api_refreshes_reveal.c')
-rw-r--r--src/lib/exchange_api_refreshes_reveal.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/src/lib/exchange_api_refreshes_reveal.c b/src/lib/exchange_api_refreshes_reveal.c
index c51e30b01..e551b482e 100644
--- a/src/lib/exchange_api_refreshes_reveal.c
+++ b/src/lib/exchange_api_refreshes_reveal.c
@@ -391,30 +391,20 @@ TALER_EXCHANGE_refreshes_reveal (
json_array_append_new (coin_evs,
GNUNET_JSON_from_data (pd.coin_ev,
pd.coin_ev_size)));
-
- /* compute link signature */
{
struct TALER_CoinSpendSignatureP link_sig;
- struct TALER_LinkDataPS ldp;
-
- ldp.purpose.size = htonl (sizeof (ldp));
- ldp.purpose.purpose = htonl (TALER_SIGNATURE_WALLET_COIN_LINK);
- ldp.h_denom_pub = denom_hash;
- GNUNET_CRYPTO_eddsa_key_get_public (&md->melted_coin.coin_priv.eddsa_priv,
- &ldp.old_coin_pub.eddsa_pub);
- ldp.transfer_pub = transfer_pub;
- GNUNET_CRYPTO_hash (pd.coin_ev,
- pd.coin_ev_size,
- &ldp.coin_envelope_hash);
- GNUNET_CRYPTO_eddsa_sign (&md->melted_coin.coin_priv.eddsa_priv,
- &ldp,
- &link_sig.eddsa_signature);
+
+ TALER_wallet_link_sign (&denom_hash,
+ &transfer_pub,
+ pd.coin_ev,
+ pd.coin_ev_size,
+ &md->melted_coin.coin_priv,
+ &link_sig);
GNUNET_assert (0 ==
- json_array_append_new (link_sigs,
- GNUNET_JSON_from_data_auto (
- &link_sig)));
+ json_array_append_new (
+ link_sigs,
+ GNUNET_JSON_from_data_auto (&link_sig)));
}
-
GNUNET_free (pd.coin_ev);
}