expand DB test to cover #6124 better (passed immediately, does not explain the failure)
This commit is contained in:
parent
d9c3627bc5
commit
6aca928cf8
@ -260,6 +260,7 @@ withdraw_transaction (void *cls,
|
|||||||
char *amount_required;
|
char *amount_required;
|
||||||
char *r_balance;
|
char *r_balance;
|
||||||
struct TALER_EXCHANGEDB_ReserveHistory *rh;
|
struct TALER_EXCHANGEDB_ReserveHistory *rh;
|
||||||
|
|
||||||
/* The reserve does not have the required amount (actual
|
/* The reserve does not have the required amount (actual
|
||||||
* amount + withdraw fee) */
|
* amount + withdraw fee) */
|
||||||
GNUNET_break_op (0);
|
GNUNET_break_op (0);
|
||||||
|
@ -1656,16 +1656,39 @@ run (void *cls)
|
|||||||
plugin->ensure_coin_known (plugin->cls,
|
plugin->ensure_coin_known (plugin->cls,
|
||||||
session,
|
session,
|
||||||
&deposit.coin));
|
&deposit.coin));
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
{
|
||||||
plugin->insert_recoup_request (plugin->cls,
|
struct TALER_EXCHANGEDB_Reserve pre_reserve;
|
||||||
session,
|
struct TALER_EXCHANGEDB_Reserve post_reserve;
|
||||||
&reserve_pub,
|
struct TALER_Amount delta;
|
||||||
&deposit.coin,
|
|
||||||
&coin_sig,
|
pre_reserve.pub = reserve_pub;
|
||||||
&coin_blind,
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
&value,
|
plugin->reserves_get (plugin->cls,
|
||||||
&cbc.h_coin_envelope,
|
session,
|
||||||
deadline));
|
&pre_reserve));
|
||||||
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
|
plugin->insert_recoup_request (plugin->cls,
|
||||||
|
session,
|
||||||
|
&reserve_pub,
|
||||||
|
&deposit.coin,
|
||||||
|
&coin_sig,
|
||||||
|
&coin_blind,
|
||||||
|
&value,
|
||||||
|
&cbc.h_coin_envelope,
|
||||||
|
deadline));
|
||||||
|
post_reserve.pub = reserve_pub;
|
||||||
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
|
plugin->reserves_get (plugin->cls,
|
||||||
|
session,
|
||||||
|
&post_reserve));
|
||||||
|
FAILIF (GNUNET_OK !=
|
||||||
|
TALER_amount_subtract (&delta,
|
||||||
|
&post_reserve.balance,
|
||||||
|
&pre_reserve.balance));
|
||||||
|
FAILIF (0 !=
|
||||||
|
TALER_amount_cmp (&delta,
|
||||||
|
&value));
|
||||||
|
}
|
||||||
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
|
||||||
plugin->select_recoup_above_serial_id (plugin->cls,
|
plugin->select_recoup_above_serial_id (plugin->cls,
|
||||||
session,
|
session,
|
||||||
|
Loading…
Reference in New Issue
Block a user