/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,23 +167,42 @@ 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);
|
GNUNET_CRYPTO_eddsa_key_get_public (&reserve_priv->eddsa_priv,
|
||||||
TALER_TESTING_interpreter_fail (is);
|
&reserve_pub.eddsa_pub);
|
||||||
return;
|
}
|
||||||
|
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));
|
||||||
}
|
}
|
||||||
|
|
||||||
GNUNET_CRYPTO_eddsa_key_get_public (&reserve_priv->eddsa_priv,
|
ss->rsh = TALER_EXCHANGE_reserve_status (ss->exchange,
|
||||||
&reserve_pub.eddsa_pub);
|
&reserve_pub,
|
||||||
ss->rsh
|
&reserve_status_cb,
|
||||||
= TALER_EXCHANGE_reserve_status (ss->exchange,
|
ss);
|
||||||
&reserve_pub,
|
|
||||||
&reserve_status_cb,
|
|
||||||
ss);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user