From b90d25ecfcaad0bd421998360dff2c4629b5705b Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 21 Dec 2022 05:29:06 -0500 Subject: Rollback in sqlcode --- src/exchangedb/pg_batch2_reserves_in_insert.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/exchangedb/pg_batch2_reserves_in_insert.c') diff --git a/src/exchangedb/pg_batch2_reserves_in_insert.c b/src/exchangedb/pg_batch2_reserves_in_insert.c index f80f7ea07..268f20d46 100644 --- a/src/exchangedb/pg_batch2_reserves_in_insert.c +++ b/src/exchangedb/pg_batch2_reserves_in_insert.c @@ -820,21 +820,22 @@ TEH_PG_batch2_reserves_in_insert (void *cls, enum GNUNET_DB_QueryStatus qs3; PREPARE (pg, - "reserves_in_add_transaction", + "reserves_update", "CALL exchange_do_batch_reserves_update" " ($1,$2,$3,$4,$5,$6,$7,$8,$9);"); for (unsigned int i = 0; ireserve_pub), + GNUNET_PQ_query_param_auto_from_type (reserves[i].reserve_pub), GNUNET_PQ_query_param_timestamp (&expiry), - GNUNET_PQ_query_param_uint64 (&reserve->wire_reference), - TALER_PQ_query_param_amount (reserve->balance), - GNUNET_PQ_query_param_string (reserve->exchange_account_name), + GNUNET_PQ_query_param_uint64 (&reserves[i].wire_reference), + TALER_PQ_query_param_amount (reserves[i].balance), + GNUNET_PQ_query_param_string (reserves[i].exchange_account_name), GNUNET_PQ_query_param_bool (conflicts[i]), GNUNET_PQ_query_param_auto_from_type (&h_payto), GNUNET_PQ_query_param_string (notify_s[i]), @@ -842,12 +843,12 @@ TEH_PG_batch2_reserves_in_insert (void *cls, }; qs3 = GNUNET_PQ_eval_prepared_non_select (pg->conn, - "reserves_in_add_transaction", + "reserves_update", params); if (qs3<0) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Failed to update reserves (%d)\n", + "Failed to update (%d)\n", qs3); return qs3; } -- cgit v1.2.3