-fix testcase, more verbose logging of client protocol errors
This commit is contained in:
parent
6237981d96
commit
e08f479eb4
@ -1835,7 +1835,16 @@ run (void *cls,
|
||||
"EUR:0.1",
|
||||
"EUR:0.1",
|
||||
"EUR:0.1",
|
||||
/* with 0.03 refresh fees each, this totals up to exactly 4 EUR */
|
||||
"EUR:0.1",
|
||||
"EUR:0.01",
|
||||
"EUR:0.01",
|
||||
"EUR:0.01",
|
||||
"EUR:0.01",
|
||||
"EUR:0.01",
|
||||
"EUR:0.01",
|
||||
/* with 0.01 withdraw fees (except for 1ct coins),
|
||||
this totals up to exactly EUR:3.97, and with
|
||||
the 0.03 refresh fee, to EUR:4.0*/
|
||||
NULL
|
||||
};
|
||||
static struct Command commands[] =
|
||||
|
@ -550,7 +550,9 @@ refresh_accept_melts (struct MHD_Connection *connection,
|
||||
GNUNET_break (0);
|
||||
TMH_plugin->free_coin_transaction_list (TMH_plugin->cls,
|
||||
tl);
|
||||
return TMH_RESPONSE_reply_internal_db_error (connection);
|
||||
return (MHD_YES ==
|
||||
TMH_RESPONSE_reply_internal_db_error (connection))
|
||||
? GNUNET_NO : GNUNET_SYSERR;
|
||||
}
|
||||
/* Refuse to refresh when the coin's value is insufficient
|
||||
for the cost of all transactions. */
|
||||
@ -587,7 +589,9 @@ refresh_accept_melts (struct MHD_Connection *connection,
|
||||
&melt))
|
||||
{
|
||||
GNUNET_break (0);
|
||||
return GNUNET_SYSERR;
|
||||
return (MHD_YES ==
|
||||
TMH_RESPONSE_reply_internal_db_error (connection))
|
||||
? GNUNET_NO : GNUNET_SYSERR;
|
||||
}
|
||||
return GNUNET_OK;
|
||||
}
|
||||
|
@ -92,6 +92,7 @@ handle_refresh_melt_binary (struct MHD_Connection *connection,
|
||||
&cost,
|
||||
&total_cost)) )
|
||||
{
|
||||
GNUNET_break_op (0);
|
||||
TMH_KS_release (key_state);
|
||||
return TMH_RESPONSE_reply_internal_error (connection,
|
||||
"cost calculation failure");
|
||||
@ -115,6 +116,7 @@ handle_refresh_melt_binary (struct MHD_Connection *connection,
|
||||
&coin_melt_details->melt_amount_with_fee,
|
||||
&fee_melt))
|
||||
{
|
||||
GNUNET_break_op (0);
|
||||
TMH_KS_release (key_state);
|
||||
return TMH_RESPONSE_reply_external_error (connection,
|
||||
"Melt contribution below melting fee");
|
||||
@ -124,6 +126,7 @@ handle_refresh_melt_binary (struct MHD_Connection *connection,
|
||||
&melt,
|
||||
&total_melt))
|
||||
{
|
||||
GNUNET_break_op (0);
|
||||
TMH_KS_release (key_state);
|
||||
return TMH_RESPONSE_reply_internal_error (connection,
|
||||
"balance calculation failure");
|
||||
@ -134,6 +137,7 @@ handle_refresh_melt_binary (struct MHD_Connection *connection,
|
||||
TALER_amount_cmp (&total_cost,
|
||||
&total_melt))
|
||||
{
|
||||
GNUNET_break_op (0);
|
||||
/* We require total value of coins being melted and
|
||||
total value of coins being generated to match! */
|
||||
return TMH_RESPONSE_reply_json_pack (connection,
|
||||
|
Loading…
Reference in New Issue
Block a user