summaryrefslogtreecommitdiff
path: root/src/exchangedb/plugin_exchangedb_postgres.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchangedb/plugin_exchangedb_postgres.c')
-rw-r--r--src/exchangedb/plugin_exchangedb_postgres.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c
index 2c863a323..3591470e7 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -1105,11 +1105,11 @@ prepare_statements (struct PostgresClosure *pg)
" WHERE "
" shard >= $2"
" AND shard <= $3"
+ " AND wire_deadline<=$1"
+ " AND refund_deadline<$1"
" AND tiny=FALSE"
" AND done=FALSE"
" AND (kyc_ok OR $4)"
- " AND wire_deadline<=$1"
- " AND refund_deadline<$1"
" ORDER BY "
" shard ASC"
" ,wire_deadline ASC"