aboutsummaryrefslogtreecommitdiff
path: root/src/mint/mint_db.h
diff options
context:
space:
mode:
authorSree Harsha Totakura <sreeharsha@totakura.in>2015-03-05 18:16:32 +0100
committerSree Harsha Totakura <sreeharsha@totakura.in>2015-03-05 18:16:32 +0100
commit129920ef8bc15ce6d3c1329c2e935dce1da285f0 (patch)
treebeb15f8c3775039945f647b2e5a8fdfd6843c3c3 /src/mint/mint_db.h
parentc62dc613ce44b9c671e9cc9328ceb0a078c4ca4e (diff)
db: Implement reserves_in_insert()
Diffstat (limited to 'src/mint/mint_db.h')
-rw-r--r--src/mint/mint_db.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mint/mint_db.h b/src/mint/mint_db.h
index b26c70b2..2c0b6dd7 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) */