[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-donau] branch master updated: work on submit receipts
From: |
gnunet |
Subject: |
[taler-donau] branch master updated: work on submit receipts |
Date: |
Wed, 17 Apr 2024 00:05:05 +0200 |
This is an automated email from the git hooks/post-receive script.
johannes-casaburi pushed a commit to branch master
in repository donau.
The following commit(s) were added to refs/heads/master by this push:
new cc61d50 work on submit receipts
cc61d50 is described below
commit cc61d5087ef79bfec8bc1ec0e8352f17cec2806a
Author: Casaburi Johannes <johannes.casaburi@students.bfh.ch>
AuthorDate: Wed Apr 17 00:04:25 2024 +0200
work on submit receipts
---
src/donau/donau-httpd_batch-submit.c | 25 ++++++++++++++++++++-----
src/include/donau_crypto_lib.h | 2 +-
2 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/src/donau/donau-httpd_batch-submit.c
b/src/donau/donau-httpd_batch-submit.c
index fc187cd..b038fa7 100644
--- a/src/donau/donau-httpd_batch-submit.c
+++ b/src/donau/donau-httpd_batch-submit.c
@@ -161,20 +161,20 @@ DH_handler_submit_receipts_post (struct DH_RequestContext
*rc,
/* parse the donation receipts */
const size_t num_dr = json_array_size (donation_receipts);
- struct DONAU_DonationReceipt *dr;
+ struct DONAU_DonationReceipt *dr_arr;
if (0 != num_dr)
{
json_t *dr_obj;
size_t index;
- dr = GNUNET_new_array (num_dr,
- struct DONAU_DonationReceipt);
+ dr_arr = GNUNET_new_array (num_dr,
+ struct DONAU_DonationReceipt);
json_array_foreach (donation_receipts, index, dr_obj)
{
if (GNUNET_SYSERR ==
- parse_json_dr (&dr[index], dr_obj))
+ parse_json_dr (&dr_arr[index], dr_obj))
{
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (rc->connection,
@@ -194,8 +194,19 @@ DH_handler_submit_receipts_post (struct DH_RequestContext
*rc,
"donation_receipts");
}
+ for (size_t i = 0; i < num_dr; i++)
{
- MHD_RESULT mhd_ret;
+ // FIXME Check sigs, Donation unit hashes, nonce
+ }
+
+ MHD_RESULT mhd_ret;
+
+ for (size_t i = 0; i < num_dr; i++)
+ {
+ // FIXME
+ struct InsertReceiptContext irc = {
+ .donation_receipt = &dr_arr[i]
+ };
if (GNUNET_OK !=
DH_DB_run_transaction (rc->connection,
@@ -208,6 +219,10 @@ DH_handler_submit_receipts_post (struct DH_RequestContext
*rc,
return mhd_ret;
}
}
+
+ // FIXME create donation statement
+ // Send back DS
+
return TALER_MHD_reply_static (
rc->connection,
MHD_HTTP_NO_CONTENT,
diff --git a/src/include/donau_crypto_lib.h b/src/include/donau_crypto_lib.h
index 9ff5b81..884b178 100644
--- a/src/include/donau_crypto_lib.h
+++ b/src/include/donau_crypto_lib.h
@@ -286,7 +286,7 @@ struct DONAU_DonationReceipt
struct DONAU_DonationUnitHashP h_donation_unit_pub;
/**
- * Nonce.
+ * Nonce from the Unique Donor Identifier.
*/
const union GNUNET_CRYPTO_BlindSessionNonce *nonce;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-donau] branch master updated: work on submit receipts,
gnunet <=