summaryrefslogtreecommitdiff
path: root/src/exchangedb
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchangedb')
-rw-r--r--src/exchangedb/plugin_exchangedb_postgres.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c
index 4814468be..f53b23104 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -983,7 +983,8 @@ postgres_prepare (PGconn *db_conn)
" WHERE"
" tiny=false AND"
" done=false AND"
- " wire_deadline<$1"
+ " wire_deadline<=$1 AND"
+ " refund_deadline<$1"
" ORDER BY wire_deadline ASC"
" LIMIT 1",
1, NULL);