aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/exchange-0001.sql
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-01-10 09:03:57 +0100
committerChristian Grothoff <christian@grothoff.org>2022-01-10 09:04:09 +0100
commitaaaaa9a103628d7694a4fb3bac6335501187cc00 (patch)
treea029d53a499dd4f22d9600ad31b57f3772ea6f43 /src/exchangedb/exchange-0001.sql
parent14efa23a2b73420593d62cc346466ff0ab322668 (diff)
fix amount denormalization issue
Diffstat (limited to 'src/exchangedb/exchange-0001.sql')
-rw-r--r--src/exchangedb/exchange-0001.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/exchangedb/exchange-0001.sql b/src/exchangedb/exchange-0001.sql
index 33b300bc4..c1665b3ba 100644
--- a/src/exchangedb/exchange-0001.sql
+++ b/src/exchangedb/exchange-0001.sql
@@ -918,7 +918,7 @@ END IF;
-- Check reserve balance is sufficient.
IF (reserve_val > amount_val)
THEN
- IF (reserve_frac > amount_frac)
+ IF (reserve_frac >= amount_frac)
THEN
reserve_val=reserve_val - amount_val;
reserve_frac=reserve_frac - amount_frac;