/reserve/status CMD.
The logic extracts the reserve pub according to the trait being a pub b64 encoding or a private key.
This commit is contained in:
parent
220e00696b
commit
208ba0d4b2
@ -167,20 +167,39 @@ status_run (void *cls,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK == TALER_TESTING_get_trait_reserve_priv
|
||||||
TALER_TESTING_get_trait_reserve_priv (create_reserve,
|
(create_reserve,
|
||||||
0,
|
0,
|
||||||
&reserve_priv))
|
&reserve_priv))
|
||||||
{
|
{
|
||||||
GNUNET_break (0);
|
|
||||||
TALER_TESTING_interpreter_fail (is);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
GNUNET_CRYPTO_eddsa_key_get_public (&reserve_priv->eddsa_priv,
|
GNUNET_CRYPTO_eddsa_key_get_public (&reserve_priv->eddsa_priv,
|
||||||
&reserve_pub.eddsa_pub);
|
&reserve_pub.eddsa_pub);
|
||||||
ss->rsh
|
}
|
||||||
= TALER_EXCHANGE_reserve_status (ss->exchange,
|
else
|
||||||
|
{
|
||||||
|
const char *transfer_subject;
|
||||||
|
|
||||||
|
if (GNUNET_OK != TALER_TESTING_get_trait_transfer_subject
|
||||||
|
(create_reserve,
|
||||||
|
0,
|
||||||
|
&transfer_subject))
|
||||||
|
{
|
||||||
|
GNUNET_break (0);
|
||||||
|
TALER_LOG_ERROR
|
||||||
|
("The reserve has neither a priv nor a subject line..\n");
|
||||||
|
TALER_TESTING_interpreter_fail (is);
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
GNUNET_STRINGS_string_to_data
|
||||||
|
(transfer_subject,
|
||||||
|
strlen (transfer_subject),
|
||||||
|
&reserve_pub.eddsa_pub,
|
||||||
|
sizeof (struct TALER_ReservePublicKeyP));
|
||||||
|
}
|
||||||
|
|
||||||
|
ss->rsh = TALER_EXCHANGE_reserve_status (ss->exchange,
|
||||||
&reserve_pub,
|
&reserve_pub,
|
||||||
&reserve_status_cb,
|
&reserve_status_cb,
|
||||||
ss);
|
ss);
|
||||||
|
Loading…
Reference in New Issue
Block a user