From bab36a2ac87b025dbdb09344c54eaf6595ab8bde Mon Sep 17 00:00:00 2001
From: Christian Grothoff <grothoff@gnunet.org>
Date: Thu, 17 Mar 2022 14:45:12 +0100
Subject: -remove dead field, return h_commitment_age to auditor

---
 src/exchangedb/exchange-0001.sql | 6 ------
 1 file changed, 6 deletions(-)

(limited to 'src/exchangedb/exchange-0001.sql')

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;
 
-- 
cgit v1.2.3

