[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: migrate to batch withdraw API
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: migrate to batch withdraw API |
Date: |
Sun, 15 Oct 2023 22:53:37 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new 5587ac11 migrate to batch withdraw API
5587ac11 is described below
commit 5587ac112392a49a5a7779d198b3e38e6f6569c4
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Sun Oct 15 22:53:33 2023 +0200
migrate to batch withdraw API
---
.../taler-merchant-httpd_post-rewards-ID-pickup.c | 26 +++++++++++++---------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_post-rewards-ID-pickup.c
b/src/backend/taler-merchant-httpd_post-rewards-ID-pickup.c
index 1a21790d..40eec8ef 100644
--- a/src/backend/taler-merchant-httpd_post-rewards-ID-pickup.c
+++ b/src/backend/taler-merchant-httpd_post-rewards-ID-pickup.c
@@ -78,7 +78,7 @@ struct PlanchetOperation
/**
* Withdraw handle (NULL while @e fo is active).
*/
- struct TALER_EXCHANGE_Withdraw2Handle *w2h;
+ struct TALER_EXCHANGE_BatchWithdraw2Handle *w2h;
/**
* Details about the planchet for withdrawing.
@@ -241,7 +241,7 @@ stop_operations (struct PickupContext *pc)
}
if (NULL != po->w2h)
{
- TALER_EXCHANGE_withdraw2_cancel (po->w2h);
+ TALER_EXCHANGE_batch_withdraw2_cancel (po->w2h);
po->w2h = NULL;
}
GNUNET_CONTAINER_DLL_remove (pc->po_head,
@@ -319,7 +319,7 @@ TMH_force_reward_pickup_resume ()
*/
static void
withdraw_cb (void *cls,
- const struct TALER_EXCHANGE_Withdraw2Response *w2r)
+ const struct TALER_EXCHANGE_BatchWithdraw2Response *w2r)
{
struct PlanchetOperation *po = cls;
const struct TALER_EXCHANGE_HttpResponse *hr = &w2r->hr;
@@ -346,10 +346,11 @@ withdraw_cb (void *cls,
TALER_MHD_daemon_trigger (); /* we resumed, kick MHD */
return;
}
+ GNUNET_assert (1 == w2r->details.ok.blind_sigs_length);
qs = TMH_db->insert_pickup_blind_signature (TMH_db->cls,
&pc->pickup_id,
po->offset,
- &w2r->details.ok.blind_sig);
+ &w2r->details.ok.blind_sigs[0]);
GNUNET_free (po);
if (qs < 0)
{
@@ -412,13 +413,16 @@ do_withdraw (void *cls,
TALER_MHD_daemon_trigger (); /* we resumed, kick MHD */
return;
}
- po->w2h = TALER_EXCHANGE_withdraw2 (TMH_curl_ctx,
- pc->exchange_url,
- keys,
- &po->pd,
- &pc->reserve_priv,
- &withdraw_cb,
- po);
+ /* FIXME: actually use *batch* withdraw instead of
+ doing this coin-by-coin non-sense */
+ po->w2h = TALER_EXCHANGE_batch_withdraw2 (TMH_curl_ctx,
+ pc->exchange_url,
+ keys,
+ &pc->reserve_priv,
+ 1,
+ &po->pd,
+ &withdraw_cb,
+ po);
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: migrate to batch withdraw API,
gnunet <=