-p2p fixes
This commit is contained in:
parent
9a05781ab3
commit
521e0bbcb5
@ -243,7 +243,7 @@ create_transaction (void *cls,
|
||||
MHD_HTTP_INTERNAL_SERVER_ERROR,
|
||||
TALER_EC_GENERIC_DB_STORE_FAILED,
|
||||
"purse create");
|
||||
return qs;
|
||||
return GNUNET_DB_STATUS_HARD_ERROR;
|
||||
}
|
||||
if (in_conflict)
|
||||
{
|
||||
@ -314,13 +314,14 @@ create_transaction (void *cls,
|
||||
{
|
||||
if (GNUNET_DB_STATUS_SOFT_ERROR == qs)
|
||||
return qs;
|
||||
GNUNET_break (0 != qs);
|
||||
TALER_LOG_WARNING (
|
||||
"Failed to store purse deposit information in database\n");
|
||||
*mhd_ret = TALER_MHD_reply_with_error (connection,
|
||||
MHD_HTTP_INTERNAL_SERVER_ERROR,
|
||||
TALER_EC_GENERIC_DB_STORE_FAILED,
|
||||
"purse create deposit");
|
||||
return qs;
|
||||
return GNUNET_DB_STATUS_HARD_ERROR;
|
||||
}
|
||||
if (! balance_ok)
|
||||
{
|
||||
@ -394,7 +395,7 @@ create_transaction (void *cls,
|
||||
MHD_HTTP_INTERNAL_SERVER_ERROR,
|
||||
TALER_EC_GENERIC_DB_STORE_FAILED,
|
||||
"purse create contract");
|
||||
return qs;
|
||||
return GNUNET_DB_STATUS_HARD_ERROR;
|
||||
}
|
||||
if (in_conflict)
|
||||
{
|
||||
@ -414,13 +415,14 @@ create_transaction (void *cls,
|
||||
{
|
||||
if (GNUNET_DB_STATUS_SOFT_ERROR == qs)
|
||||
return qs;
|
||||
GNUNET_break (0 != qs);
|
||||
TALER_LOG_WARNING (
|
||||
"Failed to store fetch contract information from database\n");
|
||||
*mhd_ret = TALER_MHD_reply_with_error (connection,
|
||||
MHD_HTTP_INTERNAL_SERVER_ERROR,
|
||||
TALER_EC_GENERIC_DB_FETCH_FAILED,
|
||||
"select contract");
|
||||
return qs;
|
||||
return GNUNET_DB_STATUS_HARD_ERROR;
|
||||
}
|
||||
GNUNET_CRYPTO_hash (econtract,
|
||||
econtract_size,
|
||||
|
@ -223,7 +223,7 @@ purse_transaction (void *cls,
|
||||
MHD_HTTP_INTERNAL_SERVER_ERROR,
|
||||
TALER_EC_GENERIC_DB_STORE_FAILED,
|
||||
"insert purse request");
|
||||
return qs;
|
||||
return GNUNET_DB_STATUS_HARD_ERROR;
|
||||
}
|
||||
if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs)
|
||||
return qs;
|
||||
@ -250,6 +250,7 @@ purse_transaction (void *cls,
|
||||
if (qs <= 0)
|
||||
{
|
||||
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR != qs);
|
||||
GNUNET_break (0 != qs);
|
||||
TALER_LOG_WARNING ("Failed to fetch purse information from database\n");
|
||||
*mhd_ret = TALER_MHD_reply_with_error (connection,
|
||||
MHD_HTTP_INTERNAL_SERVER_ERROR,
|
||||
@ -304,7 +305,7 @@ purse_transaction (void *cls,
|
||||
MHD_HTTP_INTERNAL_SERVER_ERROR,
|
||||
TALER_EC_GENERIC_DB_STORE_FAILED,
|
||||
"do reserve purse");
|
||||
return qs;
|
||||
return GNUNET_DB_STATUS_HARD_ERROR;
|
||||
}
|
||||
if (in_conflict)
|
||||
{
|
||||
@ -326,6 +327,7 @@ purse_transaction (void *cls,
|
||||
if (qs <= 0)
|
||||
{
|
||||
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR != qs);
|
||||
GNUNET_break (0 != qs);
|
||||
TALER_LOG_WARNING (
|
||||
"Failed to fetch purse merge information from database\n");
|
||||
*mhd_ret = TALER_MHD_reply_with_error (connection,
|
||||
@ -385,7 +387,7 @@ purse_transaction (void *cls,
|
||||
MHD_HTTP_INTERNAL_SERVER_ERROR,
|
||||
TALER_EC_GENERIC_DB_STORE_FAILED,
|
||||
"purse purse contract");
|
||||
return qs;
|
||||
return GNUNET_DB_STATUS_HARD_ERROR;
|
||||
}
|
||||
if (in_conflict)
|
||||
{
|
||||
@ -405,13 +407,14 @@ purse_transaction (void *cls,
|
||||
{
|
||||
if (GNUNET_DB_STATUS_SOFT_ERROR == qs)
|
||||
return qs;
|
||||
GNUNET_break (0 != qs);
|
||||
TALER_LOG_WARNING (
|
||||
"Failed to store fetch contract information from database\n");
|
||||
*mhd_ret = TALER_MHD_reply_with_error (connection,
|
||||
MHD_HTTP_INTERNAL_SERVER_ERROR,
|
||||
TALER_EC_GENERIC_DB_FETCH_FAILED,
|
||||
"select contract");
|
||||
return qs;
|
||||
return GNUNET_DB_STATUS_HARD_ERROR;
|
||||
}
|
||||
GNUNET_CRYPTO_hash (econtract,
|
||||
econtract_size,
|
||||
|
@ -92,4 +92,4 @@ DROP FUNCTION IF EXISTS create_foreign_range_partition;
|
||||
DROP FUNCTION IF EXISTS create_foreign_servers;
|
||||
DROP FUNCTION IF EXISTS create_shard_server;
|
||||
|
||||
COMMIT;
|
||||
COMMIT;
|
||||
|
@ -2716,7 +2716,7 @@ CREATE OR REPLACE FUNCTION exchange_do_reserve_purse(
|
||||
IN in_merge_timestamp INT8,
|
||||
IN in_reserve_sig BYTEA,
|
||||
IN in_purse_fee_val INT8,
|
||||
IN in_purse_fee_frac INT8,
|
||||
IN in_purse_fee_frac INT4,
|
||||
IN in_reserve_pub BYTEA,
|
||||
OUT out_no_funds BOOLEAN,
|
||||
OUT out_conflict BOOLEAN)
|
||||
|
Loading…
Reference in New Issue
Block a user