aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/exchange_do_gc.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchangedb/exchange_do_gc.sql')
-rw-r--r--src/exchangedb/exchange_do_gc.sql9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/exchangedb/exchange_do_gc.sql b/src/exchangedb/exchange_do_gc.sql
index c6331c18..07cbeb42 100644
--- a/src/exchangedb/exchange_do_gc.sql
+++ b/src/exchangedb/exchange_do_gc.sql
@@ -21,15 +21,10 @@ LANGUAGE plpgsql
AS $$
DECLARE
reserve_uuid_min INT8; -- minimum reserve UUID still alive
-DECLARE
melt_min INT8; -- minimum melt still alive
-DECLARE
coin_min INT8; -- minimum known_coin still alive
-DECLARE
deposit_min INT8; -- minimum deposit still alive
-DECLARE
reserve_out_min INT8; -- minimum reserve_out still alive
-DECLARE
denom_min INT8; -- minimum denomination still alive
BEGIN
@@ -42,8 +37,8 @@ DELETE FROM exchange.wire_fee
-- TODO: use closing fee as threshold?
DELETE FROM exchange.reserves
WHERE gc_date < in_now
- AND current_balance_val = 0
- AND current_balance_frac = 0;
+ AND current_balance.val = 0
+ AND current_balance.frac = 0;
SELECT
reserve_out_serial_id