summaryrefslogtreecommitdiff
path: root/src/exchangedb/pg_insert_wire_fee.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchangedb/pg_insert_wire_fee.c')
-rw-r--r--src/exchangedb/pg_insert_wire_fee.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/exchangedb/pg_insert_wire_fee.c b/src/exchangedb/pg_insert_wire_fee.c
index 278ec2bcb..af818bcca 100644
--- a/src/exchangedb/pg_insert_wire_fee.c
+++ b/src/exchangedb/pg_insert_wire_fee.c
@@ -26,21 +26,24 @@
#include "pg_helper.h"
#include "pg_get_wire_fee.h"
+
enum GNUNET_DB_QueryStatus
TEH_PG_insert_wire_fee (void *cls,
- const char *type,
- struct GNUNET_TIME_Timestamp start_date,
- struct GNUNET_TIME_Timestamp end_date,
- const struct TALER_WireFeeSet *fees,
- const struct TALER_MasterSignatureP *master_sig)
+ const char *type,
+ struct GNUNET_TIME_Timestamp start_date,
+ struct GNUNET_TIME_Timestamp end_date,
+ const struct TALER_WireFeeSet *fees,
+ const struct TALER_MasterSignatureP *master_sig)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_string (type),
GNUNET_PQ_query_param_timestamp (&start_date),
GNUNET_PQ_query_param_timestamp (&end_date),
- TALER_PQ_query_param_amount (&fees->wire),
- TALER_PQ_query_param_amount (&fees->closing),
+ TALER_PQ_query_param_amount (pg->conn,
+ &fees->wire),
+ TALER_PQ_query_param_amount (pg->conn,
+ &fees->closing),
GNUNET_PQ_query_param_auto_from_type (master_sig),
GNUNET_PQ_query_param_end
};
@@ -51,12 +54,12 @@ TEH_PG_insert_wire_fee (void *cls,
enum GNUNET_DB_QueryStatus qs;
qs = TEH_PG_get_wire_fee (pg,
- type,
- start_date,
- &sd,
- &ed,
- &wx,
- &sig);
+ type,
+ start_date,
+ &sd,
+ &ed,
+ &wx,
+ &sig);
if (qs < 0)
return qs;
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == qs)
@@ -88,20 +91,17 @@ TEH_PG_insert_wire_fee (void *cls,
return GNUNET_DB_STATUS_SUCCESS_NO_RESULTS;
}
- /* Used in #postgres_insert_wire_fee */
PREPARE (pg,
"insert_wire_fee",
"INSERT INTO wire_fee "
"(wire_method"
",start_date"
",end_date"
- ",wire_fee_val"
- ",wire_fee_frac"
- ",closing_fee_val"
- ",closing_fee_frac"
+ ",wire_fee"
+ ",closing_fee"
",master_sig"
") VALUES "
- "($1, $2, $3, $4, $5, $6, $7, $8);");
+ "($1, $2, $3, $4, $5, $6);");
return GNUNET_PQ_eval_prepared_non_select (pg->conn,
"insert_wire_fee",
params);