[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] 163/277: implement filter
From: |
gnunet |
Subject: |
[taler-merchant] 163/277: implement filter |
Date: |
Sun, 05 Jul 2020 20:51:16 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
commit 6f11901485a5af44c53a31ebbf4d0e93991983c9
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun May 31 20:55:02 2020 +0200
implement filter
---
src/backenddb/plugin_merchantdb_postgres.c | 31 ++++++++++++++++++++++++++++--
1 file changed, 29 insertions(+), 2 deletions(-)
diff --git a/src/backenddb/plugin_merchantdb_postgres.c
b/src/backenddb/plugin_merchantdb_postgres.c
index 690f484..eba525b 100644
--- a/src/backenddb/plugin_merchantdb_postgres.c
+++ b/src/backenddb/plugin_merchantdb_postgres.c
@@ -3840,12 +3840,13 @@ struct LookupReservesContext
void *cb_cls;
/**
- *
+ * Filter by active reserves.
*/
enum TALER_MERCHANTDB_YesNoAll active;
/**
- *
+ * Filter by failures (missmatch in exchange claimed and
+ * merchant claimed initial amounts).
*/
enum TALER_MERCHANTDB_YesNoAll failures;
@@ -3912,6 +3913,32 @@ lookup_reserves_cb (void *cls,
lrc->qs = GNUNET_DB_STATUS_HARD_ERROR;
return;
}
+ switch (lrc->active)
+ {
+ case TALER_MERCHANTDB_YNA_YES:
+ if (! active)
+ continue;
+ case TALER_MERCHANTDB_YNA_NO:
+ if (active)
+ continue;
+ case TALER_MERCHANTDB_YNA_ALL:
+ break;
+ }
+ switch (lrc->failures)
+ {
+ case TALER_MERCHANTDB_YNA_YES:
+ if (0 ==
+ TALER_amount_cmp (&merchant_initial_balance,
+ &exchange_initial_balance))
+ continue;
+ case TALER_MERCHANTDB_YNA_NO:
+ if (0 !=
+ TALER_amount_cmp (&merchant_initial_balance,
+ &exchange_initial_balance))
+ continue;
+ case TALER_MERCHANTDB_YNA_ALL:
+ break;
+ }
lrc->cb (lrc->cb_cls,
&reserve_pub,
creation_time,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-merchant] 137/277: implement POST /tips/ID/pickup, (continued)
- [taler-merchant] 137/277: implement POST /tips/ID/pickup, gnunet, 2020/07/05
- [taler-merchant] 141/277: Merge branch 'protocolV1' of git+ssh://git.taler.net/merchant into protocolV1, gnunet, 2020/07/05
- [taler-merchant] 143/277: more SQL for tips, gnunet, 2020/07/05
- [taler-merchant] 148/277: fixed inventory locking, test code for transfer lookups, gnunet, 2020/07/05
- [taler-merchant] 155/277: fix ftbfs, gnunet, 2020/07/05
- [taler-merchant] 154/277: return creation_time instead of leaving it uninitizlied, mark problematic missing lines, gnunet, 2020/07/05
- [taler-merchant] 158/277: work on tip APIs, gnunet, 2020/07/05
- [taler-merchant] 156/277: implement lookup tip details, gnunet, 2020/07/05
- [taler-merchant] 159/277: add POST /tips logic, gnunet, 2020/07/05
- [taler-merchant] 164/277: fixed db test building and added test for wire fee storage, gnunet, 2020/07/05
- [taler-merchant] 163/277: implement filter,
gnunet <=
- [taler-merchant] 165/277: add logic for activation of reserves to merchant backend DB, gnunet, 2020/07/05
- [taler-merchant] 147/277: added more tests for contract terms, deposits, and transfers, gnunet, 2020/07/05
- [taler-merchant] 160/277: address DB fixes for missing EC values, gnunet, 2020/07/05
- [taler-merchant] 157/277: fix DB use, gnunet, 2020/07/05
- [taler-merchant] 166/277: SQL fixing, gnunet, 2020/07/05
- [taler-merchant] 152/277: wrote db tests for tips/lookups, gnunet, 2020/07/05
- [taler-merchant] 145/277: refactored the existing product and order tests, gnunet, 2020/07/05
- [taler-merchant] 171/277: tests/fixes for tips and pickups in backenddb, gnunet, 2020/07/05
- [taler-merchant] 169/277: implement POST /private/reserves, gnunet, 2020/07/05
- [taler-merchant] 161/277: fix misc issues in client APIs, gnunet, 2020/07/05