diff options
| author | Christian Grothoff <christian@grothoff.org> | 2021-12-16 20:18:44 +0100 | 
|---|---|---|
| committer | Christian Grothoff <christian@grothoff.org> | 2021-12-16 20:18:44 +0100 | 
| commit | 1acc851deb38c52e4212823100eec8a00d5f385a (patch) | |
| tree | 67d62b84291996a0def04e9cec16e06025a285ed /src/exchangedb | |
| parent | 3b6a0dd5994b824ecbf246bb17e5be7611e89386 (diff) | |
-fix recoup ugliness
Diffstat (limited to 'src/exchangedb')
| -rw-r--r-- | src/exchangedb/exchange-0001.sql | 5 | ||||
| -rw-r--r-- | src/exchangedb/plugin_exchangedb_postgres.c | 4 | ||||
| -rw-r--r-- | src/exchangedb/test_exchangedb.c | 39 | 
3 files changed, 24 insertions, 24 deletions
| diff --git a/src/exchangedb/exchange-0001.sql b/src/exchangedb/exchange-0001.sql index 1725b70e..a267fe13 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 23307bf8..99ebd7c7 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 a8a9f3e1..65689d87 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, | 
