aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/pg_reserves_in_insert.c
diff options
context:
space:
mode:
authorJoseph <Joseph.xu@efrei.net>2022-11-15 05:46:26 -0500
committerJoseph <Joseph.xu@efrei.net>2022-11-15 05:46:26 -0500
commit656ec29d5e30f4020046b2126254dda22dd5bc25 (patch)
treee9b1c2b681cf945653ed256e17e31cf080865b5d /src/exchangedb/pg_reserves_in_insert.c
parent6991ca011b4f97d24066f82ccd09adde8a692f6a (diff)
downloadexchange-656ec29d5e30f4020046b2126254dda22dd5bc25.tar.xz
new test
Diffstat (limited to 'src/exchangedb/pg_reserves_in_insert.c')
-rw-r--r--src/exchangedb/pg_reserves_in_insert.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/exchangedb/pg_reserves_in_insert.c b/src/exchangedb/pg_reserves_in_insert.c
index 38524bd61..2fcca241d 100644
--- a/src/exchangedb/pg_reserves_in_insert.c
+++ b/src/exchangedb/pg_reserves_in_insert.c
@@ -59,12 +59,12 @@ notify_on_reserve (struct PostgresClosure *pg,
enum GNUNET_DB_QueryStatus
TEH_PG_reserves_in_insert (void *cls,
- const struct TALER_ReservePublicKeyP *reserve_pub,
- const struct TALER_Amount *balance,
- struct GNUNET_TIME_Timestamp execution_time,
- const char *sender_account_details,
- const char *exchange_account_section,
- uint64_t wire_ref)
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ const struct TALER_Amount *balance,
+ struct GNUNET_TIME_Timestamp execution_time,
+ const char *sender_account_details,
+ const char *exchange_account_section,
+ uint64_t wire_ref)
{
struct PostgresClosure *pg = cls;
enum GNUNET_DB_QueryStatus qs1;
@@ -107,9 +107,6 @@ TEH_PG_reserves_in_insert (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Reserve does not exist; creating a new one\n");
/* Note: query uses 'on conflict do nothing' */
-
-
-
PREPARE (pg,
"reserve_create",
"INSERT INTO reserves "
@@ -122,7 +119,6 @@ TEH_PG_reserves_in_insert (void *cls,
"($1, $2, $3, $4, $5)"
" ON CONFLICT DO NOTHING"
" RETURNING reserve_uuid;");
-
qs1 = GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
"reserve_create",
params,
@@ -154,7 +150,6 @@ TEH_PG_reserves_in_insert (void *cls,
GNUNET_PQ_query_param_end
};
-
PREPARE (pg,
"reserves_in_add_transaction",
"INSERT INTO reserves_in "
@@ -207,7 +202,7 @@ TEH_PG_reserves_in_insert (void *cls,
return cs;
if (GNUNET_OK !=
TEH_PG_start (pg,
- "reserve-update-serializable"))
+ "reserve-update-serializable"))
{
GNUNET_break (0);
return GNUNET_DB_STATUS_HARD_ERROR;
@@ -217,7 +212,7 @@ TEH_PG_reserves_in_insert (void *cls,
enum GNUNET_DB_QueryStatus reserve_exists;
reserve_exists = TEH_PG_reserves_get (pg,
- &reserve);
+ &reserve);
switch (reserve_exists)
{
case GNUNET_DB_STATUS_HARD_ERROR:
@@ -287,7 +282,8 @@ TEH_PG_reserves_in_insert (void *cls,
if (cs < 0)
return cs;
if (GNUNET_OK !=
- TEH_PG_start_read_committed (pg, "reserve-insert-continued"))
+ TEH_PG_start_read_committed (pg,
+ "reserve-insert-continued"))
{
GNUNET_break (0);
return GNUNET_DB_STATUS_HARD_ERROR;