summaryrefslogtreecommitdiff
path: root/src/exchangedb
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchangedb')
-rw-r--r--src/exchangedb/exchange-0001.sql5
-rw-r--r--src/exchangedb/plugin_exchangedb_postgres.c4
-rw-r--r--src/exchangedb/test_exchangedb.c39
3 files changed, 24 insertions, 24 deletions
diff --git a/src/exchangedb/exchange-0001.sql b/src/exchangedb/exchange-0001.sql
index 1725b70e0..a267fe137 100644
--- a/src/exchangedb/exchange-0001.sql
+++ b/src/exchangedb/exchange-0001.sql
@@ -697,8 +697,6 @@ CREATE INDEX IF NOT EXISTS revolving_work_shards_index
-- Stored procedures
-DROP FUNCTION IF EXISTS exchange_do_withdraw(bigint,integer,bytea,bytea,bytea,bytea,bytea,bigint,bigint) ;
-
CREATE OR REPLACE FUNCTION exchange_do_withdraw(
IN amount_val INT8,
IN amount_frac INT4,
@@ -857,9 +855,6 @@ COMMENT ON FUNCTION exchange_do_withdraw(INT8, INT4, BYTEA, BYTEA, BYTEA, BYTEA,
-DROP FUNCTION IF EXISTS exchange_do_withdraw_limit_check(bigint,bigint,bigint,int) ;
-
-
CREATE OR REPLACE FUNCTION exchange_do_withdraw_limit_check(
IN ruuid INT8,
IN start_time INT8,
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c
index 23307bf80..99ebd7c7b 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -3246,8 +3246,8 @@ postgres_get_denomination_info (
rs);
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs)
return qs;
- issue->properties.purpose.size = htonl (sizeof (struct
- TALER_DenominationKeyValidityPS));
+ issue->properties.purpose.size
+ = htonl (sizeof (struct TALER_DenominationKeyValidityPS));
issue->properties.purpose.purpose = htonl (
TALER_SIGNATURE_MASTER_DENOMINATION_KEY_VALIDITY);
issue->properties.denom_hash = *denom_pub_hash;
diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c
index a8a9f3e16..65689d872 100644
--- a/src/exchangedb/test_exchangedb.c
+++ b/src/exchangedb/test_exchangedb.c
@@ -238,23 +238,26 @@ create_denom_key_pair (unsigned int size,
sizeof (struct TALER_EXCHANGEDB_DenominationKey));
dki.denom_pub = dkp->pub;
dki.issue.properties.start = GNUNET_TIME_timestamp_hton (now);
- dki.issue.properties.expire_withdraw = GNUNET_TIME_timestamp_hton
- (GNUNET_TIME_absolute_to_timestamp
- (GNUNET_TIME_absolute_add (
- now.abs_time,
- GNUNET_TIME_UNIT_HOURS)));
- dki.issue.properties.expire_deposit = GNUNET_TIME_timestamp_hton (
- GNUNET_TIME_absolute_to_timestamp
- (GNUNET_TIME_absolute_add
- (now.abs_time,
- GNUNET_TIME_relative_multiply (
- GNUNET_TIME_UNIT_HOURS, 2))));
- dki.issue.properties.expire_legal = GNUNET_TIME_timestamp_hton (
- GNUNET_TIME_absolute_to_timestamp
- (GNUNET_TIME_absolute_add
- (now.abs_time,
- GNUNET_TIME_relative_multiply (
- GNUNET_TIME_UNIT_HOURS, 3))));
+ dki.issue.properties.expire_withdraw
+ = GNUNET_TIME_timestamp_hton
+ (GNUNET_TIME_absolute_to_timestamp
+ (GNUNET_TIME_absolute_add (
+ now.abs_time,
+ GNUNET_TIME_UNIT_HOURS)));
+ dki.issue.properties.expire_deposit
+ = GNUNET_TIME_timestamp_hton (
+ GNUNET_TIME_absolute_to_timestamp
+ (GNUNET_TIME_absolute_add
+ (now.abs_time,
+ GNUNET_TIME_relative_multiply (
+ GNUNET_TIME_UNIT_HOURS, 2))));
+ dki.issue.properties.expire_legal
+ = GNUNET_TIME_timestamp_hton (
+ GNUNET_TIME_absolute_to_timestamp
+ (GNUNET_TIME_absolute_add
+ (now.abs_time,
+ GNUNET_TIME_relative_multiply (
+ GNUNET_TIME_UNIT_HOURS, 3))));
TALER_amount_hton (&dki.issue.properties.value, value);
TALER_amount_hton (&dki.issue.properties.fee_withdraw, fee_withdraw);
TALER_amount_hton (&dki.issue.properties.fee_deposit, fee_deposit);
@@ -276,6 +279,8 @@ create_denom_key_pair (unsigned int size,
destroy_denom_key_pair (dkp);
return NULL;
}
+ memset (&issue2, 0, sizeof (issue2));
+ plugin->commit (plugin->cls);
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
plugin->get_denomination_info (plugin->cls,
&dki.issue.properties.denom_hash,