[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: -more work on extended fakebank
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: -more work on extended fakebank API |
Date: |
Mon, 15 Aug 2022 20:26:06 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new b1050243 -more work on extended fakebank API
b1050243 is described below
commit b1050243eb02e424f55c3d6c78787a47944c8f33
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Aug 15 20:26:03 2022 +0200
-more work on extended fakebank API
---
src/bank-lib/fakebank.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/bank-lib/fakebank.c b/src/bank-lib/fakebank.c
index 2f1d7868..5c323b5d 100644
--- a/src/bank-lib/fakebank.c
+++ b/src/bank-lib/fakebank.c
@@ -2739,13 +2739,19 @@ do_post_withdrawal (struct TALER_FAKEBANK_Handle *h,
TALER_EC_BANK_WITHDRAWAL_OPERATION_RESERVE_SELECTION_CONFLICT,
NULL);
}
- // FIXME: check if reserve_pub is known. If so:
- if (0)
{
- return TALER_MHD_reply_with_error (connection,
- MHD_HTTP_CONFLICT,
-
TALER_EC_BANK_DUPLICATE_RESERVE_PUB_SUBJECT,
- NULL);
+ /* check if reserve_pub is already in use */
+ const struct GNUNET_PeerIdentity *pid;
+
+ pid = (const struct GNUNET_PeerIdentity *) &wo->reserve_pub;
+ if (GNUNET_CONTAINER_multipeermap_contains (h->rpubs,
+ pid))
+ {
+ return TALER_MHD_reply_with_error (connection,
+ MHD_HTTP_CONFLICT,
+
TALER_EC_BANK_DUPLICATE_RESERVE_PUB_SUBJECT,
+ NULL);
+ }
}
wo->reserve_pub = *reserve_pub;
GNUNET_free (wo->exchange_account); // FIXME: or conflict if changed?
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.