diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mint-lib/test_mint_api.c | 11 | ||||
-rw-r--r-- | src/mint/taler-mint-httpd_db.c | 8 | ||||
-rw-r--r-- | src/mint/taler-mint-httpd_refresh.c | 4 |
3 files changed, 20 insertions, 3 deletions
diff --git a/src/mint-lib/test_mint_api.c b/src/mint-lib/test_mint_api.c index bae96dfb3..4b1b0f228 100644 --- a/src/mint-lib/test_mint_api.c +++ b/src/mint-lib/test_mint_api.c @@ -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[] = diff --git a/src/mint/taler-mint-httpd_db.c b/src/mint/taler-mint-httpd_db.c index e24102ead..04c2555ec 100644 --- a/src/mint/taler-mint-httpd_db.c +++ b/src/mint/taler-mint-httpd_db.c @@ -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; } diff --git a/src/mint/taler-mint-httpd_refresh.c b/src/mint/taler-mint-httpd_refresh.c index 954d8daf7..625fcc50c 100644 --- a/src/mint/taler-mint-httpd_refresh.c +++ b/src/mint/taler-mint-httpd_refresh.c @@ -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, |