-get p2p test to pass
This commit is contained in:
parent
d623cab1a3
commit
3e8c797bb7
@ -325,7 +325,6 @@ parse_coin (struct MHD_Connection *connection,
|
|||||||
if (GNUNET_OK != res)
|
if (GNUNET_OK != res)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
TALER_wallet_purse_deposit_verify (TEH_base_url,
|
TALER_wallet_purse_deposit_verify (TEH_base_url,
|
||||||
pcc->purse_pub,
|
pcc->purse_pub,
|
||||||
|
@ -70,11 +70,6 @@ struct TALER_EXCHANGE_PurseDepositHandle
|
|||||||
*/
|
*/
|
||||||
void *cb_cls;
|
void *cb_cls;
|
||||||
|
|
||||||
/**
|
|
||||||
* Expected value in the purse after fees.
|
|
||||||
*/
|
|
||||||
struct TALER_Amount purse_value_after_fees;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Public key of the purse.
|
* Public key of the purse.
|
||||||
*/
|
*/
|
||||||
@ -102,8 +97,10 @@ handle_purse_deposit_finished (void *cls,
|
|||||||
.hr.reply = j,
|
.hr.reply = j,
|
||||||
.hr.http_status = (unsigned int) response_code
|
.hr.http_status = (unsigned int) response_code
|
||||||
};
|
};
|
||||||
|
const struct TALER_EXCHANGE_Keys *keys;
|
||||||
|
|
||||||
pch->job = NULL;
|
pch->job = NULL;
|
||||||
|
keys = TALER_EXCHANGE_get_keys (pch->exchange);
|
||||||
switch (response_code)
|
switch (response_code)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@ -124,7 +121,7 @@ handle_purse_deposit_finished (void *cls,
|
|||||||
GNUNET_JSON_spec_timestamp ("exchange_timestamp",
|
GNUNET_JSON_spec_timestamp ("exchange_timestamp",
|
||||||
&etime),
|
&etime),
|
||||||
TALER_JSON_spec_amount ("total_deposited",
|
TALER_JSON_spec_amount ("total_deposited",
|
||||||
pch->purse_value_after_fees.currency,
|
keys->currency,
|
||||||
&total_deposited),
|
&total_deposited),
|
||||||
GNUNET_JSON_spec_end ()
|
GNUNET_JSON_spec_end ()
|
||||||
};
|
};
|
||||||
@ -242,6 +239,11 @@ TALER_EXCHANGE_purse_deposit (
|
|||||||
char *url;
|
char *url;
|
||||||
char arg_str[sizeof (pch->purse_pub) * 2 + 32];
|
char arg_str[sizeof (pch->purse_pub) * 2 + 32];
|
||||||
|
|
||||||
|
if (0 == num_deposits)
|
||||||
|
{
|
||||||
|
GNUNET_break (0);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
GNUNET_assert (GNUNET_YES ==
|
GNUNET_assert (GNUNET_YES ==
|
||||||
TEAH_handle_is_ready (exchange));
|
TEAH_handle_is_ready (exchange));
|
||||||
pch = GNUNET_new (struct TALER_EXCHANGE_PurseDepositHandle);
|
pch = GNUNET_new (struct TALER_EXCHANGE_PurseDepositHandle);
|
||||||
@ -301,9 +303,9 @@ TALER_EXCHANGE_purse_deposit (
|
|||||||
GNUNET_free (pch);
|
GNUNET_free (pch);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
GNUNET_CRYPTO_eddsa_key_get_public (&deposit->coin_priv.eddsa_priv,
|
GNUNET_CRYPTO_eddsa_key_get_public (&deposit->coin_priv.eddsa_priv,
|
||||||
&coin_pub.eddsa_pub);
|
&coin_pub.eddsa_pub);
|
||||||
#endif
|
|
||||||
TALER_wallet_purse_deposit_sign (
|
TALER_wallet_purse_deposit_sign (
|
||||||
url,
|
url,
|
||||||
&pch->purse_pub,
|
&pch->purse_pub,
|
||||||
|
@ -286,7 +286,7 @@ test_exchange_api_rsa_LDADD = \
|
|||||||
$(XLIB)
|
$(XLIB)
|
||||||
|
|
||||||
test_exchange_p2p_cs_SOURCES = \
|
test_exchange_p2p_cs_SOURCES = \
|
||||||
test_exchange_api.c
|
test_exchange_p2p.c
|
||||||
test_exchange_p2p_cs_LDADD = \
|
test_exchange_p2p_cs_LDADD = \
|
||||||
libtalertesting.la \
|
libtalertesting.la \
|
||||||
$(top_builddir)/src/lib/libtalerexchange.la \
|
$(top_builddir)/src/lib/libtalerexchange.la \
|
||||||
|
@ -278,9 +278,6 @@ TALER_CRYPTO_contract_encrypt_for_merge (
|
|||||||
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
|
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
|
||||||
&nonce,
|
&nonce,
|
||||||
sizeof (nonce));
|
sizeof (nonce));
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
|
||||||
"Encrypting with key %s\n",
|
|
||||||
TALER_B2S (&key));
|
|
||||||
contract_encrypt (&nonce,
|
contract_encrypt (&nonce,
|
||||||
&key,
|
&key,
|
||||||
sizeof (key),
|
sizeof (key),
|
||||||
@ -318,9 +315,6 @@ TALER_CRYPTO_contract_decrypt_for_merge (
|
|||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
|
||||||
"Decrypting with key %s\n",
|
|
||||||
TALER_B2S (&key));
|
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
contract_decrypt (&key,
|
contract_decrypt (&key,
|
||||||
sizeof (key),
|
sizeof (key),
|
||||||
|
Loading…
Reference in New Issue
Block a user