rename TALER_JSON_hash to TALER_JSON_contract_hash
This commit is contained in:
parent
6ef6de6c5c
commit
90e756ddea
@ -155,8 +155,8 @@ TALER_JSON_spec_denomination_signature (const char *field,
|
|||||||
* @return #GNUNET_OK on success, #GNUNET_SYSERR on error
|
* @return #GNUNET_OK on success, #GNUNET_SYSERR on error
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_JSON_hash (const json_t *json,
|
TALER_JSON_contract_hash (const json_t *json,
|
||||||
struct GNUNET_HashCode *hc);
|
struct GNUNET_HashCode *hc);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract the Taler error code from the given @a json object.
|
* Extract the Taler error code from the given @a json object.
|
||||||
|
@ -38,8 +38,8 @@
|
|||||||
* @return #GNUNET_OK on success, #GNUNET_SYSERR on error
|
* @return #GNUNET_OK on success, #GNUNET_SYSERR on error
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_JSON_hash (const json_t *json,
|
TALER_JSON_contract_hash (const json_t *json,
|
||||||
struct GNUNET_HashCode *hc)
|
struct GNUNET_HashCode *hc)
|
||||||
{
|
{
|
||||||
char *wire_enc;
|
char *wire_enc;
|
||||||
size_t len;
|
size_t len;
|
||||||
|
@ -33,7 +33,8 @@ main (int argc,
|
|||||||
json_t *wire_xtalerbank;
|
json_t *wire_xtalerbank;
|
||||||
json_t *wire_iban;
|
json_t *wire_iban;
|
||||||
const char *payto_xtalerbank = "payto://x-taler-bank/42";
|
const char *payto_xtalerbank = "payto://x-taler-bank/42";
|
||||||
const char *payto_iban = "payto://iban/BIC-TO-BE-SKIPPED/DE89370400440532013000";
|
const char *payto_iban =
|
||||||
|
"payto://iban/BIC-TO-BE-SKIPPED/DE89370400440532013000";
|
||||||
char *p_xtalerbank;
|
char *p_xtalerbank;
|
||||||
char *p_iban;
|
char *p_iban;
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ run (void *cls,
|
|||||||
&bc.exchange_auth,
|
&bc.exchange_auth,
|
||||||
bc.user42_payto),
|
bc.user42_payto),
|
||||||
TALER_TESTING_cmd_sleep ("Waiting 4s for 'credit-1' to settle",
|
TALER_TESTING_cmd_sleep ("Waiting 4s for 'credit-1' to settle",
|
||||||
4),
|
4),
|
||||||
TALER_TESTING_cmd_bank_credits ("history-1c",
|
TALER_TESTING_cmd_bank_credits ("history-1c",
|
||||||
&bc.exchange_auth,
|
&bc.exchange_auth,
|
||||||
NULL,
|
NULL,
|
||||||
@ -110,7 +110,7 @@ run (void *cls,
|
|||||||
"http://exchange.example.com/"),
|
"http://exchange.example.com/"),
|
||||||
|
|
||||||
TALER_TESTING_cmd_sleep ("Waiting 5s for 'debit-1' to settle",
|
TALER_TESTING_cmd_sleep ("Waiting 5s for 'debit-1' to settle",
|
||||||
5),
|
5),
|
||||||
TALER_TESTING_cmd_bank_debits ("history-2b",
|
TALER_TESTING_cmd_bank_debits ("history-2b",
|
||||||
&bc.exchange_auth,
|
&bc.exchange_auth,
|
||||||
NULL,
|
NULL,
|
||||||
@ -203,8 +203,9 @@ main (int argc,
|
|||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
return 77;
|
return 77;
|
||||||
}
|
}
|
||||||
} else if (GNUNET_YES == TALER_TESTING_has_in_name (argv[0],
|
}
|
||||||
"_with_nexus"))
|
else if (GNUNET_YES == TALER_TESTING_has_in_name (argv[0],
|
||||||
|
"_with_nexus"))
|
||||||
{
|
{
|
||||||
TALER_LOG_DEBUG ("Running with Nexus.\n");
|
TALER_LOG_DEBUG ("Running with Nexus.\n");
|
||||||
with_libeufin = GNUNET_YES;
|
with_libeufin = GNUNET_YES;
|
||||||
@ -218,7 +219,8 @@ main (int argc,
|
|||||||
return 77;
|
return 77;
|
||||||
}
|
}
|
||||||
libeufin_services = TALER_TESTING_run_libeufin (&bc);
|
libeufin_services = TALER_TESTING_run_libeufin (&bc);
|
||||||
if ( (NULL == libeufin_services.nexus) || (NULL == libeufin_services.sandbox) )
|
if ( (NULL == libeufin_services.nexus) || (NULL ==
|
||||||
|
libeufin_services.sandbox) )
|
||||||
{
|
{
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
return 77;
|
return 77;
|
||||||
|
@ -256,8 +256,8 @@ deposit_confirmation_run (void *cls,
|
|||||||
/* Very unlikely to fail */
|
/* Very unlikely to fail */
|
||||||
GNUNET_assert (NULL != contract_terms);
|
GNUNET_assert (NULL != contract_terms);
|
||||||
GNUNET_assert (GNUNET_OK ==
|
GNUNET_assert (GNUNET_OK ==
|
||||||
TALER_JSON_hash (contract_terms,
|
TALER_JSON_contract_hash (contract_terms,
|
||||||
&h_contract_terms));
|
&h_contract_terms));
|
||||||
GNUNET_assert (GNUNET_OK ==
|
GNUNET_assert (GNUNET_OK ==
|
||||||
TALER_TESTING_get_trait_wire_details (deposit_cmd,
|
TALER_TESTING_get_trait_wire_details (deposit_cmd,
|
||||||
dcs->coin_index,
|
dcs->coin_index,
|
||||||
|
@ -372,8 +372,8 @@ deposit_run (void *cls,
|
|||||||
ds->coin_index,
|
ds->coin_index,
|
||||||
&denom_pub_sig)) ||
|
&denom_pub_sig)) ||
|
||||||
(GNUNET_OK !=
|
(GNUNET_OK !=
|
||||||
TALER_JSON_hash (ds->contract_terms,
|
TALER_JSON_contract_hash (ds->contract_terms,
|
||||||
&h_contract_terms)) )
|
&h_contract_terms)) )
|
||||||
{
|
{
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
TALER_TESTING_interpreter_fail (is);
|
TALER_TESTING_interpreter_fail (is);
|
||||||
|
@ -246,8 +246,8 @@ track_transaction_run (void *cls,
|
|||||||
TALER_JSON_merchant_wire_signature_hash (wire_details,
|
TALER_JSON_merchant_wire_signature_hash (wire_details,
|
||||||
&h_wire_details)) &&
|
&h_wire_details)) &&
|
||||||
(GNUNET_OK ==
|
(GNUNET_OK ==
|
||||||
TALER_JSON_hash (contract_terms,
|
TALER_JSON_contract_hash (contract_terms,
|
||||||
&h_contract_terms)) );
|
&h_contract_terms)) );
|
||||||
|
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
TALER_TESTING_get_trait_merchant_priv (transaction_cmd,
|
TALER_TESTING_get_trait_merchant_priv (transaction_cmd,
|
||||||
|
@ -168,8 +168,8 @@ refund_run (void *cls,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
GNUNET_assert (GNUNET_OK ==
|
GNUNET_assert (GNUNET_OK ==
|
||||||
TALER_JSON_hash (contract_terms,
|
TALER_JSON_contract_hash (contract_terms,
|
||||||
&h_contract_terms));
|
&h_contract_terms));
|
||||||
|
|
||||||
/* Hunting for a coin .. */
|
/* Hunting for a coin .. */
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
|
Loading…
Reference in New Issue
Block a user