-get p2p test to pass

This commit is contained in:
Christian Grothoff 2022-04-27 13:28:28 +02:00
parent d623cab1a3
commit 3e8c797bb7
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
4 changed files with 10 additions and 15 deletions

View File

@ -325,7 +325,6 @@ parse_coin (struct MHD_Connection *connection,
if (GNUNET_OK != res)
return res;
}
if (GNUNET_OK !=
TALER_wallet_purse_deposit_verify (TEH_base_url,
pcc->purse_pub,

View File

@ -70,11 +70,6 @@ struct TALER_EXCHANGE_PurseDepositHandle
*/
void *cb_cls;
/**
* Expected value in the purse after fees.
*/
struct TALER_Amount purse_value_after_fees;
/**
* Public key of the purse.
*/
@ -102,8 +97,10 @@ handle_purse_deposit_finished (void *cls,
.hr.reply = j,
.hr.http_status = (unsigned int) response_code
};
const struct TALER_EXCHANGE_Keys *keys;
pch->job = NULL;
keys = TALER_EXCHANGE_get_keys (pch->exchange);
switch (response_code)
{
case 0:
@ -124,7 +121,7 @@ handle_purse_deposit_finished (void *cls,
GNUNET_JSON_spec_timestamp ("exchange_timestamp",
&etime),
TALER_JSON_spec_amount ("total_deposited",
pch->purse_value_after_fees.currency,
keys->currency,
&total_deposited),
GNUNET_JSON_spec_end ()
};
@ -242,6 +239,11 @@ TALER_EXCHANGE_purse_deposit (
char *url;
char arg_str[sizeof (pch->purse_pub) * 2 + 32];
if (0 == num_deposits)
{
GNUNET_break (0);
return NULL;
}
GNUNET_assert (GNUNET_YES ==
TEAH_handle_is_ready (exchange));
pch = GNUNET_new (struct TALER_EXCHANGE_PurseDepositHandle);
@ -301,9 +303,9 @@ TALER_EXCHANGE_purse_deposit (
GNUNET_free (pch);
return NULL;
}
#endif
GNUNET_CRYPTO_eddsa_key_get_public (&deposit->coin_priv.eddsa_priv,
&coin_pub.eddsa_pub);
#endif
TALER_wallet_purse_deposit_sign (
url,
&pch->purse_pub,

View File

@ -286,7 +286,7 @@ test_exchange_api_rsa_LDADD = \
$(XLIB)
test_exchange_p2p_cs_SOURCES = \
test_exchange_api.c
test_exchange_p2p.c
test_exchange_p2p_cs_LDADD = \
libtalertesting.la \
$(top_builddir)/src/lib/libtalerexchange.la \

View File

@ -278,9 +278,6 @@ TALER_CRYPTO_contract_encrypt_for_merge (
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
&nonce,
sizeof (nonce));
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Encrypting with key %s\n",
TALER_B2S (&key));
contract_encrypt (&nonce,
&key,
sizeof (key),
@ -318,9 +315,6 @@ TALER_CRYPTO_contract_decrypt_for_merge (
GNUNET_break (0);
return NULL;
}
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Decrypting with key %s\n",
TALER_B2S (&key));
if (GNUNET_OK !=
contract_decrypt (&key,
sizeof (key),