diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2022-03-17 14:45:12 +0100 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2022-03-17 14:45:12 +0100 |
commit | bab36a2ac87b025dbdb09344c54eaf6595ab8bde (patch) | |
tree | 3ec8ee464b72be6b476fd3bd75cf6aec79273454 /src/exchangedb | |
parent | 12809b28ec6fb7a9b5a846faa9c652f7c3fd63e1 (diff) | |
download | exchange-bab36a2ac87b025dbdb09344c54eaf6595ab8bde.tar.xz |
-remove dead field, return h_commitment_age to auditor
Diffstat (limited to 'src/exchangedb')
-rw-r--r-- | src/exchangedb/exchange-0001.sql | 6 | ||||
-rw-r--r-- | src/exchangedb/irbt_callbacks.c | 2 | ||||
-rw-r--r-- | src/exchangedb/plugin_exchangedb_postgres.c | 10 |
3 files changed, 4 insertions, 14 deletions
diff --git a/src/exchangedb/exchange-0001.sql b/src/exchangedb/exchange-0001.sql index 70e8462ab..a634cbf10 100644 --- a/src/exchangedb/exchange-0001.sql +++ b/src/exchangedb/exchange-0001.sql @@ -439,7 +439,6 @@ CREATE TABLE IF NOT EXISTS refresh_commitments (melt_serial_id BIGINT GENERATED BY DEFAULT AS IDENTITY -- UNIQUE ,rc BYTEA PRIMARY KEY CHECK (LENGTH(rc)=64) ,old_coin_pub BYTEA NOT NULL REFERENCES known_coins (coin_pub) ON DELETE CASCADE - ,h_age_commitment BYTEA CHECK(LENGTH(h_age_commitment)=32) ,old_coin_sig BYTEA NOT NULL CHECK(LENGTH(old_coin_sig)=64) ,amount_with_fee_val INT8 NOT NULL ,amount_with_fee_frac INT4 NOT NULL @@ -454,8 +453,6 @@ COMMENT ON COLUMN refresh_commitments.rc IS 'Commitment made by the client, hash over the various client inputs in the cut-and-choose protocol'; COMMENT ON COLUMN refresh_commitments.old_coin_pub IS 'Coin being melted in the refresh process.'; -COMMENT ON COLUMN refresh_commitments.h_age_commitment - IS 'The (optional) age commitment that was involved in the minting process of the coin, may be NULL. -- FIXME: Oec: this is in known_coins, why replicated here!??!'; CREATE TABLE IF NOT EXISTS refresh_commitments_default PARTITION OF refresh_commitments @@ -1640,7 +1637,6 @@ CREATE OR REPLACE FUNCTION exchange_do_melt( IN in_old_coin_pub BYTEA, IN in_old_coin_sig BYTEA, IN in_known_coin_id INT8, -- not used, but that's OK - IN in_h_age_commitment BYTEA, IN in_noreveal_index INT4, IN in_zombie_required BOOLEAN, OUT out_balance_ok BOOLEAN, @@ -1663,7 +1659,6 @@ INSERT INTO refresh_commitments ,old_coin_sig ,amount_with_fee_val ,amount_with_fee_frac - ,h_age_commitment ,noreveal_index ) VALUES @@ -1672,7 +1667,6 @@ INSERT INTO refresh_commitments ,in_old_coin_sig ,in_amount_with_fee_val ,in_amount_with_fee_frac - ,in_h_age_commitment ,in_noreveal_index) ON CONFLICT DO NOTHING; diff --git a/src/exchangedb/irbt_callbacks.c b/src/exchangedb/irbt_callbacks.c index e417c106e..50b69a729 100644 --- a/src/exchangedb/irbt_callbacks.c +++ b/src/exchangedb/irbt_callbacks.c @@ -415,8 +415,6 @@ irbt_cb_table_refresh_commitments (struct PostgresClosure *pg, &td->details.refresh_commitments.noreveal_index), GNUNET_PQ_query_param_auto_from_type ( &td->details.refresh_commitments.old_coin_pub), - GNUNET_PQ_query_param_auto_from_type ( - &td->details.refresh_commitments.h_age_commitment), GNUNET_PQ_query_param_end }; diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c index f9152d489..0346c505b 100644 --- a/src/exchangedb/plugin_exchangedb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -649,7 +649,7 @@ prepare_statements (struct PostgresClosure *pg) ",out_zombie_bad AS zombie_required" ",out_noreveal_index AS noreveal_index" " FROM exchange_do_melt" - " ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10);", + " ($1,$2,$3,$4,$5,$6,$7,$8,$9);", 9), /* Used in #postgres_do_refund() to refund a deposit. */ GNUNET_PQ_make_prepare ( @@ -1582,7 +1582,7 @@ prepare_statements (struct PostgresClosure *pg) " recoup_refresh_uuid" ",recoup_timestamp" ",old_coins.coin_pub AS old_coin_pub" - ",old_coins.age_commitment_hash" + ",new_coins.age_commitment_hash" ",old_denoms.denom_pub_hash AS old_denom_pub_hash" ",new_coins.coin_pub As coin_pub" ",coin_sig" @@ -2736,9 +2736,8 @@ prepare_statements (struct PostgresClosure *pg) ",amount_with_fee_frac" ",noreveal_index" ",old_coin_pub" - ",h_age_commitment" ") VALUES " - "($1, $2, $3, $4, $5, $6, $7, $8);", + "($1, $2, $3, $4, $5, $6, $7);", 7), GNUNET_PQ_make_prepare ( "insert_into_table_refresh_revealed_coins", @@ -4860,7 +4859,6 @@ postgres_do_melt ( GNUNET_PQ_query_param_auto_from_type (&refresh->coin.coin_pub), GNUNET_PQ_query_param_auto_from_type (&refresh->coin_sig), GNUNET_PQ_query_param_uint64 (&known_coin_id), - GNUNET_PQ_query_param_auto_from_type (&refresh->coin.h_age_commitment), GNUNET_PQ_query_param_uint32 (&refresh->noreveal_index), GNUNET_PQ_query_param_bool (*zombie_required), GNUNET_PQ_query_param_end @@ -9692,7 +9690,7 @@ recoup_refresh_serial_helper_cb (void *cls, &amount), GNUNET_PQ_result_spec_end }; - int ret; + enum GNUNET_GenericReturnValue ret; if (GNUNET_OK != GNUNET_PQ_extract_result (result, |