diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-04-27 10:16:51 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-04-27 10:34:36 +0200 |
commit | 521e0bbcb5a2bb247678bc69aef7d85c16944865 (patch) | |
tree | 635d94a2441e5b50ad10b8549978615265ae21b4 | |
parent | 9a05781ab37470e5b2cb22d6992c00b2913075e7 (diff) |
-p2p fixes
-rw-r--r-- | src/exchange/taler-exchange-httpd_purses_create.c | 10 | ||||
-rw-r--r-- | src/exchange/taler-exchange-httpd_reserves_purse.c | 11 | ||||
-rw-r--r-- | src/exchangedb/drop-common.sql | 2 | ||||
-rw-r--r-- | src/exchangedb/exchange-0001-part.sql | 2 |
4 files changed, 15 insertions, 10 deletions
diff --git a/src/exchange/taler-exchange-httpd_purses_create.c b/src/exchange/taler-exchange-httpd_purses_create.c index acd9bcc55..4034978b9 100644 --- a/src/exchange/taler-exchange-httpd_purses_create.c +++ b/src/exchange/taler-exchange-httpd_purses_create.c @@ -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, diff --git a/src/exchange/taler-exchange-httpd_reserves_purse.c b/src/exchange/taler-exchange-httpd_reserves_purse.c index 825b8acc0..3991b4161 100644 --- a/src/exchange/taler-exchange-httpd_reserves_purse.c +++ b/src/exchange/taler-exchange-httpd_reserves_purse.c @@ -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, diff --git a/src/exchangedb/drop-common.sql b/src/exchangedb/drop-common.sql index b14a00c82..3bdff7de0 100644 --- a/src/exchangedb/drop-common.sql +++ b/src/exchangedb/drop-common.sql @@ -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;
\ No newline at end of file +COMMIT; diff --git a/src/exchangedb/exchange-0001-part.sql b/src/exchangedb/exchange-0001-part.sql index 9053e4884..9ca66cd4d 100644 --- a/src/exchangedb/exchange-0001-part.sql +++ b/src/exchangedb/exchange-0001-part.sql @@ -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) |