diff --git a/src/exchangedb/0003-age_withdraw.sql b/src/exchangedb/0003-age_withdraw.sql index aed615da6..1d296b057 100644 --- a/src/exchangedb/0003-age_withdraw.sql +++ b/src/exchangedb/0003-age_withdraw.sql @@ -32,8 +32,8 @@ BEGIN ',reserve_pub BYTEA NOT NULL CONSTRAINT reserve_pub_length CHECK(LENGTH(reserve_pub)=32)' ',reserve_sig BYTEA NOT NULL CONSTRAINT reserve_sig_length CHECK(LENGTH(reserve_sig)=64)' ',noreveal_index SMALLINT NOT NULL CONSTRAINT noreveal_index_positive CHECK(noreveal_index>=0)' - ',h_blind_evs BYTEA[] NOT NULL CONSTRAINT h_blind_evs_length CHECK(cardinality(h_blind_evs)=cardinality(denomination_serials))' - ',denom_serials INT8[] NOT NULL CONSTRAINT denominations_serial_array_length CHECK(cardinality(denom_serials)=cardinality(denom_sigs))' + ',h_blind_evs BYTEA[] NOT NULL CONSTRAINT h_blind_evs_length CHECK(cardinality(h_blind_evs)=cardinality(denom_serials))' + ',denom_serials INT8[] NOT NULL CONSTRAINT denom_serials_array_length CHECK(cardinality(denom_serials)=cardinality(denom_sigs))' ',denom_sigs BYTEA[] NOT NULL CONSTRAINT denom_sigs_array_length CHECK(cardinality(denom_sigs)=cardinality(denom_serials))' ') %s ;' ,table_name diff --git a/src/exchangedb/exchange_do_batch_withdraw.sql b/src/exchangedb/exchange_do_batch_withdraw.sql index 6d3b9a11d..870137e8e 100644 --- a/src/exchangedb/exchange_do_batch_withdraw.sql +++ b/src/exchangedb/exchange_do_batch_withdraw.sql @@ -27,7 +27,7 @@ CREATE OR REPLACE FUNCTION exchange_do_batch_withdraw( OUT balance_ok BOOLEAN, OUT age_ok BOOLEAN, OUT allowed_maximum_age INT4, -- in years - OUT ruuid INT8 + OUT ruuid INT8) LANGUAGE plpgsql AS $$ DECLARE @@ -75,7 +75,7 @@ END IF; IF ((NOT do_age_check) OR (reserve_birthday = 0)) THEN age_ok = OK; - required_age = 0; + allowed_maximum_age = -1; ELSE -- Age requirements are formally not met: The exchange is setup to support -- age restrictions (do_age_check == TRUE) and the reserve has a diff --git a/src/exchangedb/pg_get_withdraw_info.c b/src/exchangedb/pg_get_withdraw_info.c index 08f950596..d6a180b00 100644 --- a/src/exchangedb/pg_get_withdraw_info.c +++ b/src/exchangedb/pg_get_withdraw_info.c @@ -27,7 +27,7 @@ enum GNUNET_DB_QueryStatus -TEH_PG_get_withdraw ( +TEH_PG_get_withdraw_info ( void *cls, const struct TALER_BlindedCoinHashP *bch, struct TALER_EXCHANGEDB_CollectableBlindcoin *collectable)