check return value from TALER_JSON_hash
This commit is contained in:
parent
1da03b95eb
commit
2f715c27f8
@ -606,7 +606,7 @@ struct ReserveContext
|
|||||||
* Transaction status code, set to error codes if applicable.
|
* Transaction status code, set to error codes if applicable.
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus qs;
|
enum GNUNET_DB_QueryStatus qs;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -2182,8 +2182,15 @@ check_wire_out_cb (void *cls,
|
|||||||
wcc.date = date;
|
wcc.date = date;
|
||||||
TALER_amount_get_zero (amount->currency,
|
TALER_amount_get_zero (amount->currency,
|
||||||
&wcc.total_deposits);
|
&wcc.total_deposits);
|
||||||
TALER_JSON_hash (wire,
|
if (GNUNET_OK !=
|
||||||
&wcc.h_wire);
|
TALER_JSON_hash (wire,
|
||||||
|
&wcc.h_wire))
|
||||||
|
{
|
||||||
|
report_row_inconsistency ("wire_out",
|
||||||
|
rowid,
|
||||||
|
"could not hash wire address");
|
||||||
|
return GNUNET_OK;
|
||||||
|
}
|
||||||
qs = edb->lookup_wire_transfer (edb->cls,
|
qs = edb->lookup_wire_transfer (edb->cls,
|
||||||
esession,
|
esession,
|
||||||
wtid,
|
wtid,
|
||||||
@ -3170,7 +3177,7 @@ deposit_cb (void *cls,
|
|||||||
/* This should not be possible, unless the AUDITOR
|
/* This should not be possible, unless the AUDITOR
|
||||||
has a bug in tracking total balance. */
|
has a bug in tracking total balance. */
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
cc->qs = GNUNET_DB_STATUS_HARD_ERROR;
|
cc->qs = GNUNET_DB_STATUS_HARD_ERROR;
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3191,7 +3198,7 @@ deposit_cb (void *cls,
|
|||||||
&dfee))
|
&dfee))
|
||||||
{
|
{
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
cc->qs = GNUNET_DB_STATUS_HARD_ERROR;
|
cc->qs = GNUNET_DB_STATUS_HARD_ERROR;
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3304,7 +3311,7 @@ refund_cb (void *cls,
|
|||||||
&amount_without_fee))
|
&amount_without_fee))
|
||||||
{
|
{
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
cc->qs = GNUNET_DB_STATUS_HARD_ERROR;
|
cc->qs = GNUNET_DB_STATUS_HARD_ERROR;
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
}
|
}
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
@ -3313,7 +3320,7 @@ refund_cb (void *cls,
|
|||||||
&amount_without_fee))
|
&amount_without_fee))
|
||||||
{
|
{
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
cc->qs = GNUNET_DB_STATUS_HARD_ERROR;
|
cc->qs = GNUNET_DB_STATUS_HARD_ERROR;
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
}
|
}
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
@ -3322,7 +3329,7 @@ refund_cb (void *cls,
|
|||||||
&amount_without_fee))
|
&amount_without_fee))
|
||||||
{
|
{
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
cc->qs = GNUNET_DB_STATUS_HARD_ERROR;
|
cc->qs = GNUNET_DB_STATUS_HARD_ERROR;
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
}
|
}
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
@ -3331,7 +3338,7 @@ refund_cb (void *cls,
|
|||||||
&amount_without_fee))
|
&amount_without_fee))
|
||||||
{
|
{
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
cc->qs = GNUNET_DB_STATUS_HARD_ERROR;
|
cc->qs = GNUNET_DB_STATUS_HARD_ERROR;
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3347,7 +3354,7 @@ refund_cb (void *cls,
|
|||||||
&refund_fee))
|
&refund_fee))
|
||||||
{
|
{
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
cc->qs = GNUNET_DB_STATUS_HARD_ERROR;
|
cc->qs = GNUNET_DB_STATUS_HARD_ERROR;
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3431,7 +3438,7 @@ analyze_coins (void *cls)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* process refreshs */
|
/* process refreshs */
|
||||||
if (0 >
|
if (0 >
|
||||||
(qs = edb->select_refreshs_above_serial_id (edb->cls,
|
(qs = edb->select_refreshs_above_serial_id (edb->cls,
|
||||||
esession,
|
esession,
|
||||||
pp.last_melt_serial_id,
|
pp.last_melt_serial_id,
|
||||||
|
@ -883,8 +883,9 @@ spend_coin (struct Coin *coin,
|
|||||||
dr.purpose.size = htonl (sizeof (struct TALER_DepositRequestPS));
|
dr.purpose.size = htonl (sizeof (struct TALER_DepositRequestPS));
|
||||||
dr.purpose.purpose = htonl (TALER_SIGNATURE_WALLET_COIN_DEPOSIT);
|
dr.purpose.purpose = htonl (TALER_SIGNATURE_WALLET_COIN_DEPOSIT);
|
||||||
dr.h_contract_terms = h_contract_terms;
|
dr.h_contract_terms = h_contract_terms;
|
||||||
TALER_JSON_hash (merchant_details,
|
GNUNET_assert (GNUNET_OK ==
|
||||||
&dr.h_wire);
|
TALER_JSON_hash (merchant_details,
|
||||||
|
&dr.h_wire));
|
||||||
|
|
||||||
dr.timestamp = GNUNET_TIME_absolute_hton (timestamp);
|
dr.timestamp = GNUNET_TIME_absolute_hton (timestamp);
|
||||||
dr.refund_deadline = GNUNET_TIME_absolute_hton (refund_deadline);
|
dr.refund_deadline = GNUNET_TIME_absolute_hton (refund_deadline);
|
||||||
|
@ -415,9 +415,13 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange,
|
|||||||
GNUNET_assert (GNUNET_YES ==
|
GNUNET_assert (GNUNET_YES ==
|
||||||
MAH_handle_is_ready (exchange));
|
MAH_handle_is_ready (exchange));
|
||||||
/* initialize h_wire */
|
/* initialize h_wire */
|
||||||
GNUNET_assert (GNUNET_OK ==
|
if (GNUNET_OK !=
|
||||||
TALER_JSON_hash (wire_details,
|
TALER_JSON_hash (wire_details,
|
||||||
&h_wire));
|
&h_wire))
|
||||||
|
{
|
||||||
|
GNUNET_break (0);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
key_state = TALER_EXCHANGE_get_keys (exchange);
|
key_state = TALER_EXCHANGE_get_keys (exchange);
|
||||||
dki = TALER_EXCHANGE_get_denomination_key (key_state,
|
dki = TALER_EXCHANGE_get_denomination_key (key_state,
|
||||||
denom_pub);
|
denom_pub);
|
||||||
|
@ -354,8 +354,13 @@ parse_reserve_history (struct TALER_EXCHANGE_Handle *exchange,
|
|||||||
}
|
}
|
||||||
TALER_amount_hton (&rcc.closing_amount,
|
TALER_amount_hton (&rcc.closing_amount,
|
||||||
&amount);
|
&amount);
|
||||||
TALER_JSON_hash (rhistory[off].details.close_details.receiver_account_details,
|
if (GNUNET_OK !=
|
||||||
&rcc.h_wire);
|
TALER_JSON_hash (rhistory[off].details.close_details.receiver_account_details,
|
||||||
|
&rcc.h_wire))
|
||||||
|
{
|
||||||
|
GNUNET_break (0);
|
||||||
|
return GNUNET_SYSERR;
|
||||||
|
}
|
||||||
rcc.wtid = rhistory[off].details.close_details.wtid;
|
rcc.wtid = rhistory[off].details.close_details.wtid;
|
||||||
rcc.purpose.size = htonl (sizeof (rcc));
|
rcc.purpose.size = htonl (sizeof (rcc));
|
||||||
rcc.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_RESERVE_CLOSED);
|
rcc.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_RESERVE_CLOSED);
|
||||||
|
@ -1709,8 +1709,9 @@ wire_deposits_cb (void *cls,
|
|||||||
wire = json_loads (dep->details.deposit.wire_details,
|
wire = json_loads (dep->details.deposit.wire_details,
|
||||||
JSON_REJECT_DUPLICATES,
|
JSON_REJECT_DUPLICATES,
|
||||||
NULL);
|
NULL);
|
||||||
TALER_JSON_hash (wire,
|
GNUNET_assert (GNUNET_OK ==
|
||||||
&hw);
|
TALER_JSON_hash (wire,
|
||||||
|
&hw));
|
||||||
json_decref (wire);
|
json_decref (wire);
|
||||||
if (0 != memcmp (&hw,
|
if (0 != memcmp (&hw,
|
||||||
h_wire,
|
h_wire,
|
||||||
@ -2261,8 +2262,9 @@ interpreter_run (void *cls)
|
|||||||
fail (is);
|
fail (is);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
TALER_JSON_hash (contract_terms,
|
GNUNET_assert (GNUNET_OK ==
|
||||||
&h_contract_terms);
|
TALER_JSON_hash (contract_terms,
|
||||||
|
&h_contract_terms));
|
||||||
json_decref (contract_terms);
|
json_decref (contract_terms);
|
||||||
wire = json_loads (cmd->details.deposit.wire_details,
|
wire = json_loads (cmd->details.deposit.wire_details,
|
||||||
JSON_REJECT_DUPLICATES,
|
JSON_REJECT_DUPLICATES,
|
||||||
@ -2307,8 +2309,9 @@ interpreter_run (void *cls)
|
|||||||
dr.purpose.size = htonl (sizeof (struct TALER_DepositRequestPS));
|
dr.purpose.size = htonl (sizeof (struct TALER_DepositRequestPS));
|
||||||
dr.purpose.purpose = htonl (TALER_SIGNATURE_WALLET_COIN_DEPOSIT);
|
dr.purpose.purpose = htonl (TALER_SIGNATURE_WALLET_COIN_DEPOSIT);
|
||||||
dr.h_contract_terms = h_contract_terms;
|
dr.h_contract_terms = h_contract_terms;
|
||||||
TALER_JSON_hash (wire,
|
GNUNET_assert (GNUNET_OK ==
|
||||||
&dr.h_wire);
|
TALER_JSON_hash (wire,
|
||||||
|
&dr.h_wire));
|
||||||
dr.timestamp = GNUNET_TIME_absolute_hton (timestamp);
|
dr.timestamp = GNUNET_TIME_absolute_hton (timestamp);
|
||||||
dr.refund_deadline = GNUNET_TIME_absolute_hton (refund_deadline);
|
dr.refund_deadline = GNUNET_TIME_absolute_hton (refund_deadline);
|
||||||
TALER_amount_hton (&dr.amount_with_fee,
|
TALER_amount_hton (&dr.amount_with_fee,
|
||||||
@ -2542,15 +2545,17 @@ interpreter_run (void *cls)
|
|||||||
JSON_REJECT_DUPLICATES,
|
JSON_REJECT_DUPLICATES,
|
||||||
NULL);
|
NULL);
|
||||||
GNUNET_assert (NULL != wire);
|
GNUNET_assert (NULL != wire);
|
||||||
TALER_JSON_hash (wire,
|
GNUNET_assert (GNUNET_OK ==
|
||||||
&h_wire);
|
TALER_JSON_hash (wire,
|
||||||
|
&h_wire));
|
||||||
json_decref (wire);
|
json_decref (wire);
|
||||||
contract_terms = json_loads (ref->details.deposit.contract_terms,
|
contract_terms = json_loads (ref->details.deposit.contract_terms,
|
||||||
JSON_REJECT_DUPLICATES,
|
JSON_REJECT_DUPLICATES,
|
||||||
NULL);
|
NULL);
|
||||||
GNUNET_assert (NULL != contract_terms);
|
GNUNET_assert (NULL != contract_terms);
|
||||||
TALER_JSON_hash (contract_terms,
|
GNUNET_assert (GNUNET_OK ==
|
||||||
&h_contract_terms);
|
TALER_JSON_hash (contract_terms,
|
||||||
|
&h_contract_terms));
|
||||||
json_decref (contract_terms);
|
json_decref (contract_terms);
|
||||||
cmd->details.deposit_wtid.dwh
|
cmd->details.deposit_wtid.dwh
|
||||||
= TALER_EXCHANGE_track_transaction (exchange,
|
= TALER_EXCHANGE_track_transaction (exchange,
|
||||||
@ -2665,8 +2670,9 @@ interpreter_run (void *cls)
|
|||||||
JSON_REJECT_DUPLICATES,
|
JSON_REJECT_DUPLICATES,
|
||||||
NULL);
|
NULL);
|
||||||
GNUNET_assert (NULL != contract_terms);
|
GNUNET_assert (NULL != contract_terms);
|
||||||
TALER_JSON_hash (contract_terms,
|
GNUNET_assert (GNUNET_OK ==
|
||||||
&h_contract_terms);
|
TALER_JSON_hash (contract_terms,
|
||||||
|
&h_contract_terms));
|
||||||
json_decref (contract_terms);
|
json_decref (contract_terms);
|
||||||
|
|
||||||
coin = find_command (is,
|
coin = find_command (is,
|
||||||
|
@ -354,7 +354,7 @@ update_fees (struct WirePlugin *wp,
|
|||||||
struct TALER_EXCHANGEDB_Session *session)
|
struct TALER_EXCHANGEDB_Session *session)
|
||||||
{
|
{
|
||||||
enum GNUNET_DB_QueryStatus qs;
|
enum GNUNET_DB_QueryStatus qs;
|
||||||
|
|
||||||
advance_fees (wp,
|
advance_fees (wp,
|
||||||
now);
|
now);
|
||||||
if (NULL != wp->af)
|
if (NULL != wp->af)
|
||||||
@ -595,7 +595,7 @@ deposit_cb (void *cls,
|
|||||||
const json_t *wire)
|
const json_t *wire)
|
||||||
{
|
{
|
||||||
enum GNUNET_DB_QueryStatus qs;
|
enum GNUNET_DB_QueryStatus qs;
|
||||||
|
|
||||||
au->merchant_pub = *merchant_pub;
|
au->merchant_pub = *merchant_pub;
|
||||||
if (GNUNET_SYSERR ==
|
if (GNUNET_SYSERR ==
|
||||||
TALER_amount_subtract (&au->total_amount,
|
TALER_amount_subtract (&au->total_amount,
|
||||||
@ -611,8 +611,15 @@ deposit_cb (void *cls,
|
|||||||
au->row_id = row_id;
|
au->row_id = row_id;
|
||||||
GNUNET_assert (NULL == au->wire);
|
GNUNET_assert (NULL == au->wire);
|
||||||
au->wire = json_incref ((json_t *) wire);
|
au->wire = json_incref ((json_t *) wire);
|
||||||
TALER_JSON_hash (au->wire,
|
if (GNUNET_OK !=
|
||||||
&au->h_wire);
|
TALER_JSON_hash (au->wire,
|
||||||
|
&au->h_wire))
|
||||||
|
{
|
||||||
|
GNUNET_break (0);
|
||||||
|
json_decref (au->wire);
|
||||||
|
au->wire = NULL;
|
||||||
|
return GNUNET_DB_STATUS_HARD_ERROR;
|
||||||
|
}
|
||||||
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
|
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
|
||||||
&au->wtid,
|
&au->wtid,
|
||||||
sizeof (au->wtid));
|
sizeof (au->wtid));
|
||||||
@ -839,7 +846,7 @@ prepare_close_cb (void *cls,
|
|||||||
size_t buf_size)
|
size_t buf_size)
|
||||||
{
|
{
|
||||||
enum GNUNET_DB_QueryStatus qs;
|
enum GNUNET_DB_QueryStatus qs;
|
||||||
|
|
||||||
GNUNET_assert (cls == ctc);
|
GNUNET_assert (cls == ctc);
|
||||||
|
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||||
@ -867,7 +874,7 @@ prepare_close_cb (void *cls,
|
|||||||
buf_size);
|
buf_size);
|
||||||
if (GNUNET_DB_STATUS_HARD_ERROR == qs)
|
if (GNUNET_DB_STATUS_HARD_ERROR == qs)
|
||||||
{
|
{
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
db_plugin->rollback (db_plugin->cls,
|
db_plugin->rollback (db_plugin->cls,
|
||||||
ctc->session);
|
ctc->session);
|
||||||
global_ret = GNUNET_SYSERR;
|
global_ret = GNUNET_SYSERR;
|
||||||
@ -1093,7 +1100,7 @@ run_reserve_closures (void *cls)
|
|||||||
enum GNUNET_DB_QueryStatus qs;
|
enum GNUNET_DB_QueryStatus qs;
|
||||||
const struct GNUNET_SCHEDULER_TaskContext *tc;
|
const struct GNUNET_SCHEDULER_TaskContext *tc;
|
||||||
struct ExpiredReserveContext erc;
|
struct ExpiredReserveContext erc;
|
||||||
|
|
||||||
task = NULL;
|
task = NULL;
|
||||||
reserves_idle = GNUNET_NO;
|
reserves_idle = GNUNET_NO;
|
||||||
tc = GNUNET_SCHEDULER_get_task_context ();
|
tc = GNUNET_SCHEDULER_get_task_context ();
|
||||||
@ -1126,9 +1133,9 @@ run_reserve_closures (void *cls)
|
|||||||
GNUNET_TIME_absolute_get (),
|
GNUNET_TIME_absolute_get (),
|
||||||
&expired_reserve_cb,
|
&expired_reserve_cb,
|
||||||
&erc);
|
&erc);
|
||||||
switch (qs)
|
switch (qs)
|
||||||
{
|
{
|
||||||
case GNUNET_DB_STATUS_HARD_ERROR:
|
case GNUNET_DB_STATUS_HARD_ERROR:
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
db_plugin->rollback (db_plugin->cls,
|
db_plugin->rollback (db_plugin->cls,
|
||||||
session);
|
session);
|
||||||
@ -1290,7 +1297,7 @@ run_aggregation (void *cls)
|
|||||||
NULL);
|
NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Subtract wire transfer fee and round to the unit supported by the
|
/* Subtract wire transfer fee and round to the unit supported by the
|
||||||
wire transfer method; Check if after rounding down, we still have
|
wire transfer method; Check if after rounding down, we still have
|
||||||
an amount to transfer, and if not mark as 'tiny'. */
|
an amount to transfer, and if not mark as 'tiny'. */
|
||||||
@ -1322,7 +1329,7 @@ run_aggregation (void *cls)
|
|||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"Failed to start database transaction!\n");
|
"Failed to start database transaction!\n");
|
||||||
global_ret = GNUNET_SYSERR;
|
global_ret = GNUNET_SYSERR;
|
||||||
cleanup_au ();
|
cleanup_au ();
|
||||||
GNUNET_SCHEDULER_shutdown ();
|
GNUNET_SCHEDULER_shutdown ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1690,7 +1697,7 @@ run_transfers (void *cls)
|
|||||||
case GNUNET_DB_STATUS_SOFT_ERROR:
|
case GNUNET_DB_STATUS_SOFT_ERROR:
|
||||||
/* try again */
|
/* try again */
|
||||||
task = GNUNET_SCHEDULER_add_now (&run_transfers,
|
task = GNUNET_SCHEDULER_add_now (&run_transfers,
|
||||||
NULL);
|
NULL);
|
||||||
return;
|
return;
|
||||||
case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
|
case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
|
||||||
/* no more prepared wire transfers, go back to aggregation! */
|
/* no more prepared wire transfers, go back to aggregation! */
|
||||||
|
@ -718,6 +718,7 @@ TEH_RESPONSE_compile_reserve_history (const struct TALER_EXCHANGEDB_ReserveHisto
|
|||||||
&deposit_total,
|
&deposit_total,
|
||||||
&pos->details.bank->amount))
|
&pos->details.bank->amount))
|
||||||
{
|
{
|
||||||
|
GNUNET_break (0);
|
||||||
json_decref (json_history);
|
json_decref (json_history);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -748,6 +749,7 @@ TEH_RESPONSE_compile_reserve_history (const struct TALER_EXCHANGEDB_ReserveHisto
|
|||||||
&withdraw_total,
|
&withdraw_total,
|
||||||
&value))
|
&value))
|
||||||
{
|
{
|
||||||
|
GNUNET_break (0);
|
||||||
json_decref (json_history);
|
json_decref (json_history);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -782,6 +784,7 @@ TEH_RESPONSE_compile_reserve_history (const struct TALER_EXCHANGEDB_ReserveHisto
|
|||||||
&deposit_total,
|
&deposit_total,
|
||||||
&payback->value))
|
&payback->value))
|
||||||
{
|
{
|
||||||
|
GNUNET_break (0);
|
||||||
json_decref (json_history);
|
json_decref (json_history);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -840,8 +843,14 @@ TEH_RESPONSE_compile_reserve_history (const struct TALER_EXCHANGEDB_ReserveHisto
|
|||||||
TALER_amount_hton (&rcc.closing_fee,
|
TALER_amount_hton (&rcc.closing_fee,
|
||||||
&pos->details.closing->closing_fee);
|
&pos->details.closing->closing_fee);
|
||||||
rcc.reserve_pub = pos->details.closing->reserve_pub;
|
rcc.reserve_pub = pos->details.closing->reserve_pub;
|
||||||
TALER_JSON_hash (pos->details.closing->receiver_account_details,
|
if (GNUNET_OK !=
|
||||||
&rcc.h_wire);
|
TALER_JSON_hash (pos->details.closing->receiver_account_details,
|
||||||
|
&rcc.h_wire))
|
||||||
|
{
|
||||||
|
GNUNET_break (0);
|
||||||
|
json_decref (json_history);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
rcc.wtid = pos->details.closing->wtid;
|
rcc.wtid = pos->details.closing->wtid;
|
||||||
TEH_KS_sign (&rcc.purpose,
|
TEH_KS_sign (&rcc.purpose,
|
||||||
&pub,
|
&pub,
|
||||||
|
@ -932,7 +932,9 @@ deposit_cb (void *cls,
|
|||||||
|
|
||||||
deposit_rowid = rowid;
|
deposit_rowid = rowid;
|
||||||
if (NULL != wire)
|
if (NULL != wire)
|
||||||
TALER_JSON_hash (wire, &h_wire);
|
GNUNET_assert (GNUNET_OK ==
|
||||||
|
TALER_JSON_hash (wire,
|
||||||
|
&h_wire));
|
||||||
if ( (0 != memcmp (merchant_pub,
|
if ( (0 != memcmp (merchant_pub,
|
||||||
&deposit->merchant_pub,
|
&deposit->merchant_pub,
|
||||||
sizeof (struct TALER_MerchantPublicKeyP))) ||
|
sizeof (struct TALER_MerchantPublicKeyP))) ||
|
||||||
@ -1776,8 +1778,9 @@ run (void *cls)
|
|||||||
RND_BLK (&deposit.merchant_pub);
|
RND_BLK (&deposit.merchant_pub);
|
||||||
RND_BLK (&deposit.h_contract_terms);
|
RND_BLK (&deposit.h_contract_terms);
|
||||||
wire = json_loads (json_wire_str, 0, NULL);
|
wire = json_loads (json_wire_str, 0, NULL);
|
||||||
TALER_JSON_hash (wire,
|
GNUNET_assert (GNUNET_OK ==
|
||||||
&deposit.h_wire);
|
TALER_JSON_hash (wire,
|
||||||
|
&deposit.h_wire));
|
||||||
deposit.receiver_wire_account = wire;
|
deposit.receiver_wire_account = wire;
|
||||||
deposit.amount_with_fee = value;
|
deposit.amount_with_fee = value;
|
||||||
deposit.deposit_fee = fee_deposit;
|
deposit.deposit_fee = fee_deposit;
|
||||||
|
@ -40,7 +40,10 @@ TALER_JSON_hash (const json_t *json,
|
|||||||
|
|
||||||
if (NULL == (wire_enc = json_dumps (json,
|
if (NULL == (wire_enc = json_dumps (json,
|
||||||
JSON_COMPACT | JSON_SORT_KEYS)))
|
JSON_COMPACT | JSON_SORT_KEYS)))
|
||||||
|
{
|
||||||
|
GNUNET_break (0);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
|
}
|
||||||
len = strlen (wire_enc) + 1;
|
len = strlen (wire_enc) + 1;
|
||||||
GNUNET_CRYPTO_hash (wire_enc,
|
GNUNET_CRYPTO_hash (wire_enc,
|
||||||
len,
|
len,
|
||||||
|
Loading…
Reference in New Issue
Block a user