document TODOs
This commit is contained in:
parent
a1f20a92a0
commit
f9347d2395
@ -13,11 +13,16 @@
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file taler-mint-httpd_db.c
|
||||
* @brief Database access abstraction for the mint.
|
||||
* @author Christian Grothoff
|
||||
*
|
||||
* TODO:
|
||||
* - actually abstract DB implementation (i.e. via plugin logic)
|
||||
* - /deposit: properly check existing deposits
|
||||
* - /deposit: properly perform commit (check return value)
|
||||
* - /deposit: check for leaks
|
||||
*/
|
||||
#include "platform.h"
|
||||
#include "taler-mint-httpd_db.h"
|
||||
@ -61,6 +66,7 @@ TALER_MINT_db_execute_deposit (struct MHD_Connection *connection,
|
||||
if (GNUNET_YES == res)
|
||||
{
|
||||
// FIXME: memory leak
|
||||
// FIXME: memcmp will not actually work here
|
||||
if (0 == memcmp (existing_deposit, deposit, sizeof (struct Deposit)))
|
||||
return TALER_MINT_reply_deposit_success (connection, deposit);
|
||||
// FIXME: in the future, check if there's enough credits
|
||||
|
@ -13,11 +13,13 @@
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file mint/taler-mint_httpd_db.h
|
||||
* @brief Mint-specific database access
|
||||
* @author Chrisitan Grothoff
|
||||
*
|
||||
* TODO:
|
||||
* - revisit and document `struct Deposit` members.
|
||||
*/
|
||||
#ifndef TALER_MINT_HTTPD_DB_H
|
||||
#define TALER_MINT_HTTPD_DB_H
|
||||
@ -28,7 +30,6 @@
|
||||
#include "taler_util.h"
|
||||
#include "taler_rsa.h"
|
||||
|
||||
GNUNET_NETWORK_STRUCT_BEGIN
|
||||
|
||||
/**
|
||||
* Specification for a /deposit operation.
|
||||
@ -37,7 +38,9 @@ struct Deposit
|
||||
{
|
||||
/* FIXME: should be TALER_CoinPublicInfo */
|
||||
struct GNUNET_CRYPTO_EddsaPublicKey coin_pub;
|
||||
|
||||
struct TALER_RSA_PublicKeyBinaryEncoded denom_pub;
|
||||
|
||||
struct TALER_RSA_Signature coin_sig;
|
||||
|
||||
struct TALER_RSA_Signature ubsig;
|
||||
@ -47,10 +50,15 @@ struct Deposit
|
||||
* #TALER_SIGNATURE_DEPOSIT or #TALER_SIGNATURE_INCREMENTAL_DEPOSIT.
|
||||
*/
|
||||
struct TALER_RSA_SignaturePurpose purpose;
|
||||
|
||||
uint64_t transaction_id;
|
||||
|
||||
struct TALER_AmountNBO amount;
|
||||
|
||||
struct GNUNET_CRYPTO_EddsaPublicKey merchant_pub;
|
||||
|
||||
struct GNUNET_HashCode h_contract;
|
||||
|
||||
struct GNUNET_HashCode h_wire;
|
||||
|
||||
/* TODO: uint16_t wire_size */
|
||||
@ -58,8 +66,6 @@ struct Deposit
|
||||
|
||||
};
|
||||
|
||||
GNUNET_NETWORK_STRUCT_END
|
||||
|
||||
|
||||
/**
|
||||
* Execute a deposit. The validity of the coin and signature
|
||||
|
@ -21,6 +21,11 @@
|
||||
* @author Florian Dold
|
||||
* @author Benedikt Mueller
|
||||
* @author Christian Grothoff
|
||||
*
|
||||
* TODO:
|
||||
* - actually verify coin signature
|
||||
* - revisit `struct Deposit` parsing once the struct
|
||||
* has been finalized
|
||||
*/
|
||||
#include "platform.h"
|
||||
#include <gnunet/gnunet_util_lib.h>
|
||||
|
@ -22,6 +22,10 @@
|
||||
* @author Florian Dold
|
||||
* @author Benedikt Mueller
|
||||
* @author Christian Grothoff
|
||||
*
|
||||
* TODO:
|
||||
* - when generating /deposit reply, do include signature of mint
|
||||
* to say that we accepted it (check reply format)
|
||||
*/
|
||||
#include "platform.h"
|
||||
#include "taler-mint-httpd_responses.h"
|
||||
|
Loading…
Reference in New Issue
Block a user