From 0c4579085a1b9f09b9e41efe69bf2deadfa22cd7 Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Thu, 5 Mar 2015 18:16:32 +0100 Subject: db: Implement reserves_in_insert() --- src/mint/mint_db.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/mint/mint_db.h') diff --git a/src/mint/mint_db.h b/src/mint/mint_db.h index b26c70b26..74f0c2d14 100644 --- a/src/mint/mint_db.h +++ b/src/mint/mint_db.h @@ -204,6 +204,23 @@ TALER_MINT_DB_reserve_get (PGconn *db, struct Reserve *reserve); +/** + * Insert a incoming transaction into reserves. New reserves are also created + * through this function. + * + * @param db the database connection handle + * @param reserve the reserve structure. The public key of the reserve should + * be set here. Upon successful execution of this function, the + * balance and expiration of the reserve will be updated. + * @param balance the amount that has to be added to the reserve + * @param expiry the new expiration time for the reserve + * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failures + */ +int +TALER_MINT_DB_reserves_in_insert (PGconn *db, + struct Reserve *reserve, + const struct TALER_Amount balance, + const struct GNUNET_TIME_Absolute expiry); /* FIXME: need call to convert CollectableBlindcoin to JSON (#3527) */ -- cgit v1.2.3