-cleanups
This commit is contained in:
parent
e27ff05e63
commit
17a30cbd70
@ -1,6 +1,6 @@
|
||||
/*
|
||||
This file is part of TALER
|
||||
Copyright (C) 2014-2021 Taler Systems SA
|
||||
Copyright (C) 2014-2022 Taler Systems SA
|
||||
|
||||
TALER is free software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU Affero General Public License as published by the Free Software
|
||||
@ -183,6 +183,7 @@ melt_transaction (void *cls,
|
||||
}
|
||||
if (! balance_ok)
|
||||
{
|
||||
GNUNET_break_op (0);
|
||||
TEH_plugin->rollback (TEH_plugin->cls);
|
||||
*mhd_ret
|
||||
= TEH_RESPONSE_reply_coin_insufficient_funds (
|
||||
@ -299,6 +300,9 @@ check_melt_valid (struct MHD_Connection *connection,
|
||||
|
||||
rmc->coin_refresh_fee = dk->meta.fee_refresh;
|
||||
rmc->coin_value = dk->meta.value;
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||
"Melted coin's denomination is worth %s\n",
|
||||
TALER_amount2s (&dk->meta.value));
|
||||
/* sanity-check that "total melt amount > melt fee" */
|
||||
if (0 <
|
||||
TALER_amount_cmp (&rmc->coin_refresh_fee,
|
||||
|
@ -479,7 +479,6 @@ start_melt (struct TALER_EXCHANGE_MeltHandle *mh)
|
||||
struct TALER_CoinSpendSignatureP confirm_sig;
|
||||
char arg_str[sizeof (struct TALER_CoinSpendPublicKeyP) * 2 + 32];
|
||||
struct TALER_DenominationHash h_denom_pub;
|
||||
struct TALER_CoinSpendPublicKeyP coin_pub;
|
||||
|
||||
if (GNUNET_OK !=
|
||||
TALER_EXCHANGE_get_melt_data_ (mh->ps,
|
||||
@ -499,7 +498,7 @@ start_melt (struct TALER_EXCHANGE_MeltHandle *mh)
|
||||
&mh->md.melted_coin.coin_priv,
|
||||
&confirm_sig);
|
||||
GNUNET_CRYPTO_eddsa_key_get_public (&mh->md.melted_coin.coin_priv.eddsa_priv,
|
||||
&coin_pub.eddsa_pub);
|
||||
&mh->coin_pub.eddsa_pub);
|
||||
melt_obj = GNUNET_JSON_PACK (
|
||||
GNUNET_JSON_pack_data_auto ("denom_pub_hash",
|
||||
&h_denom_pub),
|
||||
@ -516,7 +515,7 @@ start_melt (struct TALER_EXCHANGE_MeltHandle *mh)
|
||||
char *end;
|
||||
|
||||
end = GNUNET_STRINGS_data_to_string (
|
||||
&coin_pub,
|
||||
&mh->coin_pub,
|
||||
sizeof (struct TALER_CoinSpendPublicKeyP),
|
||||
pub_str,
|
||||
sizeof (pub_str));
|
||||
|
@ -184,7 +184,7 @@ run (void *cls,
|
||||
/**
|
||||
* Melt the rest of the coin's value (EUR:4.00 = 3x EUR:1.03 + 7x
|
||||
* EUR:0.13)
|
||||
*/
|
||||
*/
|
||||
TALER_TESTING_cmd_melt_double ("refresh-melt-1",
|
||||
"refresh-withdraw-coin-1",
|
||||
MHD_HTTP_OK,
|
||||
|
@ -765,6 +765,7 @@ TALER_TESTING_setup_with_exchange_cfg (
|
||||
#endif
|
||||
"taler-exchange-httpd",
|
||||
"taler-exchange-httpd",
|
||||
"-L", "INFO",
|
||||
"-a", /* some tests may need timetravel */
|
||||
"-c", setup_ctx->config_filename,
|
||||
#if GNU_PARALLEL
|
||||
|
@ -691,7 +691,7 @@ main_wrapper_exchange_connect (void *cls)
|
||||
*
|
||||
* @param[in,out] is state to initialize
|
||||
*/
|
||||
static int
|
||||
static enum GNUNET_GenericReturnValue
|
||||
load_keys (struct TALER_TESTING_Interpreter *is)
|
||||
{
|
||||
char *fn;
|
||||
@ -774,7 +774,7 @@ load_keys (struct TALER_TESTING_Interpreter *is)
|
||||
*
|
||||
* @param[in,out] is state to initialize
|
||||
*/
|
||||
static int
|
||||
static enum GNUNET_GenericReturnValue
|
||||
load_urls (struct TALER_TESTING_Interpreter *is)
|
||||
{
|
||||
if (GNUNET_OK !=
|
||||
@ -804,7 +804,7 @@ load_urls (struct TALER_TESTING_Interpreter *is)
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
enum GNUNET_GenericReturnValue
|
||||
TALER_TESTING_setup (TALER_TESTING_Main main_cb,
|
||||
void *main_cb_cls,
|
||||
const struct GNUNET_CONFIGURATION_Handle *cfg,
|
||||
@ -839,7 +839,8 @@ TALER_TESTING_setup (TALER_TESTING_Main main_cb,
|
||||
is.ctx = GNUNET_CURL_init
|
||||
(&GNUNET_CURL_gnunet_scheduler_reschedule,
|
||||
&is.rc);
|
||||
GNUNET_CURL_enable_async_scope_header (is.ctx, "Taler-Correlation-Id");
|
||||
GNUNET_CURL_enable_async_scope_header (is.ctx,
|
||||
"Taler-Correlation-Id");
|
||||
GNUNET_assert (NULL != is.ctx);
|
||||
is.rc = GNUNET_CURL_gnunet_rc_create (is.ctx);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user