aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/exchange/taler-exchange-httpd_responses.c2
-rw-r--r--src/exchangedb/plugin_exchangedb_postgres.c3
-rw-r--r--src/include/taler_exchangedb_plugin.h2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/exchange/taler-exchange-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c
index 26f0d76a4..d3a73d38c 100644
--- a/src/exchange/taler-exchange-httpd_responses.c
+++ b/src/exchange/taler-exchange-httpd_responses.c
@@ -512,6 +512,7 @@ compile_transaction_history (const struct TALER_EXCHANGEDB_TransactionList *tl)
TALER_amount_hton (&rr.refund_fee,
&refund->refund_fee);
/* internal sanity check before we hand out a bogus sig... */
+ sig = &refund->merchant_sig.eddsa_sig;
if (GNUNET_OK !=
GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MERCHANT_REFUND,
&rr.purpose,
@@ -522,7 +523,6 @@ compile_transaction_history (const struct TALER_EXCHANGEDB_TransactionList *tl)
json_decref (history);
return NULL;
}
- sig = &refund->merchant_sig.eddsa_sig;
details = GNUNET_JSON_from_data (&rr.purpose,
sizeof (struct TALER_RefundRequestPS));
}
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);
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index 56e226071..6a3f9249c 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -1017,7 +1017,7 @@ struct TALER_EXCHANGEDB_Plugin
/**
* Obtain information about deposits that are ready to be executed.
* Such deposits must not be marked as "tiny" or "done", and the
- * execution time must be in the past.
+ * execution time and refund deadlines must both be in the past.
*
* @param cls the @e cls of this struct with the plugin-specific state
* @param session connection to the database